Left Termination of the query pattern times_in_3(a, a, g) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

add(b, b, b).
add(X, b, X) :- binaryZ(X).
add(b, Y, Y) :- binaryZ(Y).
add(X, Y, Z) :- addz(X, Y, Z).
addx(one(X), b, one(X)) :- binary(X).
addx(zero(X), b, zero(X)) :- binaryZ(X).
addx(X, Y, Z) :- addz(X, Y, Z).
addy(b, one(Y), one(Y)) :- binary(Y).
addy(b, zero(Y), zero(Y)) :- binaryZ(Y).
addy(X, Y, Z) :- addz(X, Y, Z).
addz(zero(X), zero(Y), zero(Z)) :- addz(X, Y, Z).
addz(zero(X), one(Y), one(Z)) :- addx(X, Y, Z).
addz(one(X), zero(Y), one(Z)) :- addy(X, Y, Z).
addz(one(X), one(Y), zero(Z)) :- addc(X, Y, Z).
addc(b, b, one(b)).
addc(X, b, Z) :- succZ(X, Z).
addc(b, Y, Z) :- succZ(Y, Z).
addc(X, Y, Z) :- addC(X, Y, Z).
addX(zero(X), b, one(X)) :- binaryZ(X).
addX(one(X), b, zero(Z)) :- succ(X, Z).
addX(X, Y, Z) :- addC(X, Y, Z).
addY(b, zero(Y), one(Y)) :- binaryZ(Y).
addY(b, one(Y), zero(Z)) :- succ(Y, Z).
addY(X, Y, Z) :- addC(X, Y, Z).
addC(zero(X), zero(Y), one(Z)) :- addz(X, Y, Z).
addC(zero(X), one(Y), zero(Z)) :- addX(X, Y, Z).
addC(one(X), zero(Y), zero(Z)) :- addY(X, Y, Z).
addC(one(X), one(Y), one(Z)) :- addc(X, Y, Z).
binary(b).
binary(zero(X)) :- binaryZ(X).
binary(one(X)) :- binary(X).
binaryZ(zero(X)) :- binaryZ(X).
binaryZ(one(X)) :- binary(X).
succ(b, one(b)).
succ(zero(X), one(X)) :- binaryZ(X).
succ(one(X), zero(Z)) :- succ(X, Z).
succZ(zero(X), one(X)) :- binaryZ(X).
succZ(one(X), zero(Z)) :- succ(X, Z).
times(one(b), X, X).
times(zero(R), S, zero(RS)) :- times(R, S, RS).
times(one(R), S, RSS) :- ','(times(R, S, RS), add(S, zero(RS), RSS)).

Queries:

times(a,a,g).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
times_in: (f,f,b) (f,f,f)
add_in: (f,b,f) (f,b,b)
binaryZ_in: (f) (b)
binary_in: (f) (b)
addz_in: (f,b,f) (f,f,f) (f,b,b) (f,f,b)
addx_in: (f,f,f) (f,b,f) (f,b,b) (f,f,b)
addy_in: (f,f,f) (f,f,b)
addc_in: (f,f,f) (f,b,f)
succZ_in: (f,f) (b,f)
succ_in: (f,f) (b,f)
addC_in: (f,f,f) (f,b,f)
addX_in: (f,f,f) (f,b,f)
addY_in: (f,f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

TIMES_IN_AAG(zero(R), S, zero(RS)) → U35_AAG(R, S, RS, times_in_aaa(R, S, RS))
TIMES_IN_AAG(zero(R), S, zero(RS)) → TIMES_IN_AAA(R, S, RS)
TIMES_IN_AAA(zero(R), S, zero(RS)) → U35_AAA(R, S, RS, times_in_aaa(R, S, RS))
TIMES_IN_AAA(zero(R), S, zero(RS)) → TIMES_IN_AAA(R, S, RS)
TIMES_IN_AAA(one(R), S, RSS) → U36_AAA(R, S, RSS, times_in_aaa(R, S, RS))
TIMES_IN_AAA(one(R), S, RSS) → TIMES_IN_AAA(R, S, RS)
U36_AAA(R, S, RSS, times_out_aaa(R, S, RS)) → U37_AAA(R, S, RSS, add_in_aga(S, zero(RS), RSS))
U36_AAA(R, S, RSS, times_out_aaa(R, S, RS)) → ADD_IN_AGA(S, zero(RS), RSS)
ADD_IN_AGA(X, b, X) → U1_AGA(X, binaryZ_in_a(X))
ADD_IN_AGA(X, b, X) → BINARYZ_IN_A(X)
BINARYZ_IN_A(zero(X)) → U29_A(X, binaryZ_in_a(X))
BINARYZ_IN_A(zero(X)) → BINARYZ_IN_A(X)
BINARYZ_IN_A(one(X)) → U30_A(X, binary_in_a(X))
BINARYZ_IN_A(one(X)) → BINARY_IN_A(X)
BINARY_IN_A(zero(X)) → U27_A(X, binaryZ_in_a(X))
BINARY_IN_A(zero(X)) → BINARYZ_IN_A(X)
BINARY_IN_A(one(X)) → U28_A(X, binary_in_a(X))
BINARY_IN_A(one(X)) → BINARY_IN_A(X)
ADD_IN_AGA(b, Y, Y) → U2_AGA(Y, binaryZ_in_g(Y))
ADD_IN_AGA(b, Y, Y) → BINARYZ_IN_G(Y)
BINARYZ_IN_G(zero(X)) → U29_G(X, binaryZ_in_a(X))
BINARYZ_IN_G(zero(X)) → BINARYZ_IN_A(X)
BINARYZ_IN_G(one(X)) → U30_G(X, binary_in_g(X))
BINARYZ_IN_G(one(X)) → BINARY_IN_G(X)
BINARY_IN_G(zero(X)) → U27_G(X, binaryZ_in_a(X))
BINARY_IN_G(zero(X)) → BINARYZ_IN_A(X)
BINARY_IN_G(one(X)) → U28_G(X, binary_in_g(X))
BINARY_IN_G(one(X)) → BINARY_IN_G(X)
ADD_IN_AGA(X, Y, Z) → U3_AGA(X, Y, Z, addz_in_aga(X, Y, Z))
ADD_IN_AGA(X, Y, Z) → ADDZ_IN_AGA(X, Y, Z)
ADDZ_IN_AGA(zero(X), zero(Y), zero(Z)) → U10_AGA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AGA(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(zero(X), zero(Y), zero(Z)) → U10_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AAA(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(zero(X), one(Y), one(Z)) → U11_AAA(X, Y, Z, addx_in_aaa(X, Y, Z))
ADDZ_IN_AAA(zero(X), one(Y), one(Z)) → ADDX_IN_AAA(X, Y, Z)
ADDX_IN_AAA(one(X), b, one(X)) → U4_AAA(X, binary_in_a(X))
ADDX_IN_AAA(one(X), b, one(X)) → BINARY_IN_A(X)
ADDX_IN_AAA(zero(X), b, zero(X)) → U5_AAA(X, binaryZ_in_a(X))
ADDX_IN_AAA(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AAA(X, Y, Z) → U6_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDX_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(one(X), zero(Y), one(Z)) → U12_AAA(X, Y, Z, addy_in_aaa(X, Y, Z))
ADDZ_IN_AAA(one(X), zero(Y), one(Z)) → ADDY_IN_AAA(X, Y, Z)
ADDY_IN_AAA(b, one(Y), one(Y)) → U7_AAA(Y, binary_in_a(Y))
ADDY_IN_AAA(b, one(Y), one(Y)) → BINARY_IN_A(Y)
ADDY_IN_AAA(b, zero(Y), zero(Y)) → U8_AAA(Y, binaryZ_in_a(Y))
ADDY_IN_AAA(b, zero(Y), zero(Y)) → BINARYZ_IN_A(Y)
ADDY_IN_AAA(X, Y, Z) → U9_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDY_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(one(X), one(Y), zero(Z)) → U13_AAA(X, Y, Z, addc_in_aaa(X, Y, Z))
ADDZ_IN_AAA(one(X), one(Y), zero(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDC_IN_AAA(X, b, Z) → U14_AAA(X, Z, succZ_in_aa(X, Z))
ADDC_IN_AAA(X, b, Z) → SUCCZ_IN_AA(X, Z)
SUCCZ_IN_AA(zero(X), one(X)) → U33_AA(X, binaryZ_in_a(X))
SUCCZ_IN_AA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCCZ_IN_AA(one(X), zero(Z)) → U34_AA(X, Z, succ_in_aa(X, Z))
SUCCZ_IN_AA(one(X), zero(Z)) → SUCC_IN_AA(X, Z)
SUCC_IN_AA(zero(X), one(X)) → U31_AA(X, binaryZ_in_a(X))
SUCC_IN_AA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCC_IN_AA(one(X), zero(Z)) → U32_AA(X, Z, succ_in_aa(X, Z))
SUCC_IN_AA(one(X), zero(Z)) → SUCC_IN_AA(X, Z)
ADDC_IN_AAA(b, Y, Z) → U15_AAA(Y, Z, succZ_in_aa(Y, Z))
ADDC_IN_AAA(b, Y, Z) → SUCCZ_IN_AA(Y, Z)
ADDC_IN_AAA(X, Y, Z) → U16_AAA(X, Y, Z, addC_in_aaa(X, Y, Z))
ADDC_IN_AAA(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(zero(X), zero(Y), one(Z)) → U23_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDC_IN_AAA1(zero(X), zero(Y), one(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AAA1(zero(X), one(Y), zero(Z)) → U24_AAA(X, Y, Z, addX_in_aaa(X, Y, Z))
ADDC_IN_AAA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AAA1(X, Y, Z)
ADDX_IN_AAA1(zero(X), b, one(X)) → U17_AAA(X, binaryZ_in_a(X))
ADDX_IN_AAA1(zero(X), b, one(X)) → BINARYZ_IN_A(X)
ADDX_IN_AAA1(one(X), b, zero(Z)) → U18_AAA(X, Z, succ_in_aa(X, Z))
ADDX_IN_AAA1(one(X), b, zero(Z)) → SUCC_IN_AA(X, Z)
ADDX_IN_AAA1(X, Y, Z) → U19_AAA(X, Y, Z, addC_in_aaa(X, Y, Z))
ADDX_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(one(X), zero(Y), zero(Z)) → U25_AAA(X, Y, Z, addY_in_aaa(X, Y, Z))
ADDC_IN_AAA1(one(X), zero(Y), zero(Z)) → ADDY_IN_AAA1(X, Y, Z)
ADDY_IN_AAA1(b, zero(Y), one(Y)) → U20_AAA(Y, binaryZ_in_a(Y))
ADDY_IN_AAA1(b, zero(Y), one(Y)) → BINARYZ_IN_A(Y)
ADDY_IN_AAA1(b, one(Y), zero(Z)) → U21_AAA(Y, Z, succ_in_aa(Y, Z))
ADDY_IN_AAA1(b, one(Y), zero(Z)) → SUCC_IN_AA(Y, Z)
ADDY_IN_AAA1(X, Y, Z) → U22_AAA(X, Y, Z, addC_in_aaa(X, Y, Z))
ADDY_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(one(X), one(Y), one(Z)) → U26_AAA(X, Y, Z, addc_in_aaa(X, Y, Z))
ADDC_IN_AAA1(one(X), one(Y), one(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDZ_IN_AGA(zero(X), one(Y), one(Z)) → U11_AGA(X, Y, Z, addx_in_aga(X, Y, Z))
ADDZ_IN_AGA(zero(X), one(Y), one(Z)) → ADDX_IN_AGA(X, Y, Z)
ADDX_IN_AGA(one(X), b, one(X)) → U4_AGA(X, binary_in_a(X))
ADDX_IN_AGA(one(X), b, one(X)) → BINARY_IN_A(X)
ADDX_IN_AGA(zero(X), b, zero(X)) → U5_AGA(X, binaryZ_in_a(X))
ADDX_IN_AGA(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AGA(X, Y, Z) → U6_AGA(X, Y, Z, addz_in_aga(X, Y, Z))
ADDX_IN_AGA(X, Y, Z) → ADDZ_IN_AGA(X, Y, Z)
ADDZ_IN_AGA(one(X), zero(Y), one(Z)) → U12_AGA(X, Y, Z, addy_in_aaa(X, Y, Z))
ADDZ_IN_AGA(one(X), zero(Y), one(Z)) → ADDY_IN_AAA(X, Y, Z)
ADDZ_IN_AGA(one(X), one(Y), zero(Z)) → U13_AGA(X, Y, Z, addc_in_aga(X, Y, Z))
ADDZ_IN_AGA(one(X), one(Y), zero(Z)) → ADDC_IN_AGA(X, Y, Z)
ADDC_IN_AGA(X, b, Z) → U14_AGA(X, Z, succZ_in_aa(X, Z))
ADDC_IN_AGA(X, b, Z) → SUCCZ_IN_AA(X, Z)
ADDC_IN_AGA(b, Y, Z) → U15_AGA(Y, Z, succZ_in_ga(Y, Z))
ADDC_IN_AGA(b, Y, Z) → SUCCZ_IN_GA(Y, Z)
SUCCZ_IN_GA(zero(X), one(X)) → U33_GA(X, binaryZ_in_a(X))
SUCCZ_IN_GA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCCZ_IN_GA(one(X), zero(Z)) → U34_GA(X, Z, succ_in_ga(X, Z))
SUCCZ_IN_GA(one(X), zero(Z)) → SUCC_IN_GA(X, Z)
SUCC_IN_GA(zero(X), one(X)) → U31_GA(X, binaryZ_in_a(X))
SUCC_IN_GA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCC_IN_GA(one(X), zero(Z)) → U32_GA(X, Z, succ_in_ga(X, Z))
SUCC_IN_GA(one(X), zero(Z)) → SUCC_IN_GA(X, Z)
ADDC_IN_AGA(X, Y, Z) → U16_AGA(X, Y, Z, addC_in_aga(X, Y, Z))
ADDC_IN_AGA(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA1(zero(X), zero(Y), one(Z)) → U23_AGA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDC_IN_AGA1(zero(X), zero(Y), one(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AGA1(zero(X), one(Y), zero(Z)) → U24_AGA(X, Y, Z, addX_in_aga(X, Y, Z))
ADDC_IN_AGA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AGA1(X, Y, Z)
ADDX_IN_AGA1(zero(X), b, one(X)) → U17_AGA(X, binaryZ_in_a(X))
ADDX_IN_AGA1(zero(X), b, one(X)) → BINARYZ_IN_A(X)
ADDX_IN_AGA1(one(X), b, zero(Z)) → U18_AGA(X, Z, succ_in_aa(X, Z))
ADDX_IN_AGA1(one(X), b, zero(Z)) → SUCC_IN_AA(X, Z)
ADDX_IN_AGA1(X, Y, Z) → U19_AGA(X, Y, Z, addC_in_aga(X, Y, Z))
ADDX_IN_AGA1(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA1(one(X), zero(Y), zero(Z)) → U25_AGA(X, Y, Z, addY_in_aaa(X, Y, Z))
ADDC_IN_AGA1(one(X), zero(Y), zero(Z)) → ADDY_IN_AAA1(X, Y, Z)
ADDC_IN_AGA1(one(X), one(Y), one(Z)) → U26_AGA(X, Y, Z, addc_in_aga(X, Y, Z))
ADDC_IN_AGA1(one(X), one(Y), one(Z)) → ADDC_IN_AGA(X, Y, Z)
TIMES_IN_AAG(one(R), S, RSS) → U36_AAG(R, S, RSS, times_in_aaa(R, S, RS))
TIMES_IN_AAG(one(R), S, RSS) → TIMES_IN_AAA(R, S, RS)
U36_AAG(R, S, RSS, times_out_aaa(R, S, RS)) → U37_AAG(R, S, RSS, add_in_agg(S, zero(RS), RSS))
U36_AAG(R, S, RSS, times_out_aaa(R, S, RS)) → ADD_IN_AGG(S, zero(RS), RSS)
ADD_IN_AGG(X, b, X) → U1_AGG(X, binaryZ_in_g(X))
ADD_IN_AGG(X, b, X) → BINARYZ_IN_G(X)
ADD_IN_AGG(b, Y, Y) → U2_AGG(Y, binaryZ_in_g(Y))
ADD_IN_AGG(b, Y, Y) → BINARYZ_IN_G(Y)
ADD_IN_AGG(X, Y, Z) → U3_AGG(X, Y, Z, addz_in_agg(X, Y, Z))
ADD_IN_AGG(X, Y, Z) → ADDZ_IN_AGG(X, Y, Z)
ADDZ_IN_AGG(zero(X), zero(Y), zero(Z)) → U10_AGG(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AGG(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AGG(zero(X), one(Y), one(Z)) → U11_AGG(X, Y, Z, addx_in_agg(X, Y, Z))
ADDZ_IN_AGG(zero(X), one(Y), one(Z)) → ADDX_IN_AGG(X, Y, Z)
ADDX_IN_AGG(one(X), b, one(X)) → U4_AGG(X, binary_in_g(X))
ADDX_IN_AGG(one(X), b, one(X)) → BINARY_IN_G(X)
ADDX_IN_AGG(zero(X), b, zero(X)) → U5_AGG(X, binaryZ_in_a(X))
ADDX_IN_AGG(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AGG(X, Y, Z) → U6_AGG(X, Y, Z, addz_in_agg(X, Y, Z))
ADDX_IN_AGG(X, Y, Z) → ADDZ_IN_AGG(X, Y, Z)
ADDZ_IN_AGG(one(X), zero(Y), one(Z)) → U12_AGG(X, Y, Z, addy_in_aag(X, Y, Z))
ADDZ_IN_AGG(one(X), zero(Y), one(Z)) → ADDY_IN_AAG(X, Y, Z)
ADDY_IN_AAG(b, one(Y), one(Y)) → U7_AAG(Y, binary_in_g(Y))
ADDY_IN_AAG(b, one(Y), one(Y)) → BINARY_IN_G(Y)
ADDY_IN_AAG(b, zero(Y), zero(Y)) → U8_AAG(Y, binaryZ_in_a(Y))
ADDY_IN_AAG(b, zero(Y), zero(Y)) → BINARYZ_IN_A(Y)
ADDY_IN_AAG(X, Y, Z) → U9_AAG(X, Y, Z, addz_in_aag(X, Y, Z))
ADDY_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(zero(X), zero(Y), zero(Z)) → U10_AAG(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AAG(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAG(zero(X), one(Y), one(Z)) → U11_AAG(X, Y, Z, addx_in_aag(X, Y, Z))
ADDZ_IN_AAG(zero(X), one(Y), one(Z)) → ADDX_IN_AAG(X, Y, Z)
ADDX_IN_AAG(one(X), b, one(X)) → U4_AAG(X, binary_in_g(X))
ADDX_IN_AAG(one(X), b, one(X)) → BINARY_IN_G(X)
ADDX_IN_AAG(zero(X), b, zero(X)) → U5_AAG(X, binaryZ_in_a(X))
ADDX_IN_AAG(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AAG(X, Y, Z) → U6_AAG(X, Y, Z, addz_in_aag(X, Y, Z))
ADDX_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(one(X), zero(Y), one(Z)) → U12_AAG(X, Y, Z, addy_in_aag(X, Y, Z))
ADDZ_IN_AAG(one(X), zero(Y), one(Z)) → ADDY_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(one(X), one(Y), zero(Z)) → U13_AAG(X, Y, Z, addc_in_aaa(X, Y, Z))
ADDZ_IN_AAG(one(X), one(Y), zero(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDZ_IN_AGG(one(X), one(Y), zero(Z)) → U13_AGG(X, Y, Z, addc_in_aga(X, Y, Z))
ADDZ_IN_AGG(one(X), one(Y), zero(Z)) → ADDC_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)
U26_AGA(x1, x2, x3, x4)  =  U26_AGA(x4)
U18_AGA(x1, x2, x3)  =  U18_AGA(x3)
U5_AAG(x1, x2)  =  U5_AAG(x2)
U28_A(x1, x2)  =  U28_A(x2)
U9_AAG(x1, x2, x3, x4)  =  U9_AAG(x4)
U3_AGA(x1, x2, x3, x4)  =  U3_AGA(x4)
U24_AGA(x1, x2, x3, x4)  =  U24_AGA(x4)
U13_AAG(x1, x2, x3, x4)  =  U13_AAG(x4)
U22_AAA(x1, x2, x3, x4)  =  U22_AAA(x4)
SUCC_IN_GA(x1, x2)  =  SUCC_IN_GA(x1)
U6_AGA(x1, x2, x3, x4)  =  U6_AGA(x4)
SUCC_IN_AA(x1, x2)  =  SUCC_IN_AA
U30_G(x1, x2)  =  U30_G(x2)
U31_AA(x1, x2)  =  U31_AA(x2)
U20_AAA(x1, x2)  =  U20_AAA(x2)
ADD_IN_AGG(x1, x2, x3)  =  ADD_IN_AGG(x2, x3)
U37_AAA(x1, x2, x3, x4)  =  U37_AAA(x1, x4)
ADDY_IN_AAA(x1, x2, x3)  =  ADDY_IN_AAA
U11_AAG(x1, x2, x3, x4)  =  U11_AAG(x4)
ADDX_IN_AGG(x1, x2, x3)  =  ADDX_IN_AGG(x2, x3)
BINARYZ_IN_G(x1)  =  BINARYZ_IN_G(x1)
U33_GA(x1, x2)  =  U33_GA(x2)
U4_AGG(x1, x2)  =  U4_AGG(x1, x2)
U15_AAA(x1, x2, x3)  =  U15_AAA(x3)
ADDX_IN_AGA1(x1, x2, x3)  =  ADDX_IN_AGA1(x2)
U12_AGA(x1, x2, x3, x4)  =  U12_AGA(x4)
U32_GA(x1, x2, x3)  =  U32_GA(x3)
U21_AAA(x1, x2, x3)  =  U21_AAA(x3)
BINARY_IN_A(x1)  =  BINARY_IN_A
U23_AAA(x1, x2, x3, x4)  =  U23_AAA(x4)
U8_AAA(x1, x2)  =  U8_AAA(x2)
TIMES_IN_AAG(x1, x2, x3)  =  TIMES_IN_AAG(x3)
ADDX_IN_AAG(x1, x2, x3)  =  ADDX_IN_AAG(x3)
U17_AAA(x1, x2)  =  U17_AAA(x2)
U26_AAA(x1, x2, x3, x4)  =  U26_AAA(x4)
U11_AAA(x1, x2, x3, x4)  =  U11_AAA(x4)
TIMES_IN_AAA(x1, x2, x3)  =  TIMES_IN_AAA
SUCCZ_IN_AA(x1, x2)  =  SUCCZ_IN_AA
U27_A(x1, x2)  =  U27_A(x2)
U5_AGG(x1, x2)  =  U5_AGG(x2)
U1_AGG(x1, x2)  =  U1_AGG(x1, x2)
BINARYZ_IN_A(x1)  =  BINARYZ_IN_A
ADDC_IN_AAA(x1, x2, x3)  =  ADDC_IN_AAA
U35_AAA(x1, x2, x3, x4)  =  U35_AAA(x4)
U9_AAA(x1, x2, x3, x4)  =  U9_AAA(x4)
U6_AGG(x1, x2, x3, x4)  =  U6_AGG(x4)
ADDZ_IN_AGG(x1, x2, x3)  =  ADDZ_IN_AGG(x2, x3)
U12_AAG(x1, x2, x3, x4)  =  U12_AAG(x4)
U4_AAA(x1, x2)  =  U4_AAA(x2)
ADD_IN_AGA(x1, x2, x3)  =  ADD_IN_AGA(x2)
U25_AAA(x1, x2, x3, x4)  =  U25_AAA(x4)
ADDC_IN_AGA1(x1, x2, x3)  =  ADDC_IN_AGA1(x2)
U14_AAA(x1, x2, x3)  =  U14_AAA(x3)
U6_AAG(x1, x2, x3, x4)  =  U6_AAG(x4)
ADDY_IN_AAG(x1, x2, x3)  =  ADDY_IN_AAG(x3)
U25_AGA(x1, x2, x3, x4)  =  U25_AGA(x4)
U24_AAA(x1, x2, x3, x4)  =  U24_AAA(x4)
ADDX_IN_AAA(x1, x2, x3)  =  ADDX_IN_AAA
U4_AAG(x1, x2)  =  U4_AAG(x1, x2)
U29_G(x1, x2)  =  U29_G(x2)
U1_AGA(x1, x2)  =  U1_AGA(x2)
U2_AGA(x1, x2)  =  U2_AGA(x1, x2)
ADDC_IN_AGA(x1, x2, x3)  =  ADDC_IN_AGA(x2)
ADDZ_IN_AAG(x1, x2, x3)  =  ADDZ_IN_AAG(x3)
U27_G(x1, x2)  =  U27_G(x2)
U32_AA(x1, x2, x3)  =  U32_AA(x3)
U12_AGG(x1, x2, x3, x4)  =  U12_AGG(x4)
U36_AAG(x1, x2, x3, x4)  =  U36_AAG(x3, x4)
U28_G(x1, x2)  =  U28_G(x2)
U16_AAA(x1, x2, x3, x4)  =  U16_AAA(x4)
U13_AGG(x1, x2, x3, x4)  =  U13_AGG(x4)
U19_AGA(x1, x2, x3, x4)  =  U19_AGA(x4)
U4_AGA(x1, x2)  =  U4_AGA(x2)
U11_AGA(x1, x2, x3, x4)  =  U11_AGA(x4)
U2_AGG(x1, x2)  =  U2_AGG(x2)
ADDY_IN_AAA1(x1, x2, x3)  =  ADDY_IN_AAA1
U16_AGA(x1, x2, x3, x4)  =  U16_AGA(x4)
U15_AGA(x1, x2, x3)  =  U15_AGA(x3)
U5_AAA(x1, x2)  =  U5_AAA(x2)
BINARY_IN_G(x1)  =  BINARY_IN_G(x1)
SUCCZ_IN_GA(x1, x2)  =  SUCCZ_IN_GA(x1)
U10_AGA(x1, x2, x3, x4)  =  U10_AGA(x4)
U3_AGG(x1, x2, x3, x4)  =  U3_AGG(x4)
U13_AAA(x1, x2, x3, x4)  =  U13_AAA(x4)
U13_AGA(x1, x2, x3, x4)  =  U13_AGA(x4)
U7_AAG(x1, x2)  =  U7_AAG(x1, x2)
U7_AAA(x1, x2)  =  U7_AAA(x2)
U12_AAA(x1, x2, x3, x4)  =  U12_AAA(x4)
U34_AA(x1, x2, x3)  =  U34_AA(x3)
U37_AAG(x1, x2, x3, x4)  =  U37_AAG(x1, x4)
U8_AAG(x1, x2)  =  U8_AAG(x2)
U35_AAG(x1, x2, x3, x4)  =  U35_AAG(x4)
U17_AGA(x1, x2)  =  U17_AGA(x2)
ADDZ_IN_AAA(x1, x2, x3)  =  ADDZ_IN_AAA
U10_AAA(x1, x2, x3, x4)  =  U10_AAA(x4)
U23_AGA(x1, x2, x3, x4)  =  U23_AGA(x4)
ADDC_IN_AAA1(x1, x2, x3)  =  ADDC_IN_AAA1
U6_AAA(x1, x2, x3, x4)  =  U6_AAA(x4)
U14_AGA(x1, x2, x3)  =  U14_AGA(x3)
U18_AAA(x1, x2, x3)  =  U18_AAA(x3)
U30_A(x1, x2)  =  U30_A(x2)
U10_AGG(x1, x2, x3, x4)  =  U10_AGG(x4)
U34_GA(x1, x2, x3)  =  U34_GA(x3)
U36_AAA(x1, x2, x3, x4)  =  U36_AAA(x4)
ADDZ_IN_AGA(x1, x2, x3)  =  ADDZ_IN_AGA(x2)
U5_AGA(x1, x2)  =  U5_AGA(x2)
U19_AAA(x1, x2, x3, x4)  =  U19_AAA(x4)
U10_AAG(x1, x2, x3, x4)  =  U10_AAG(x4)
U11_AGG(x1, x2, x3, x4)  =  U11_AGG(x4)
U33_AA(x1, x2)  =  U33_AA(x2)
U31_GA(x1, x2)  =  U31_GA(x2)
ADDX_IN_AAA1(x1, x2, x3)  =  ADDX_IN_AAA1
U29_A(x1, x2)  =  U29_A(x2)
ADDX_IN_AGA(x1, x2, x3)  =  ADDX_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

TIMES_IN_AAG(zero(R), S, zero(RS)) → U35_AAG(R, S, RS, times_in_aaa(R, S, RS))
TIMES_IN_AAG(zero(R), S, zero(RS)) → TIMES_IN_AAA(R, S, RS)
TIMES_IN_AAA(zero(R), S, zero(RS)) → U35_AAA(R, S, RS, times_in_aaa(R, S, RS))
TIMES_IN_AAA(zero(R), S, zero(RS)) → TIMES_IN_AAA(R, S, RS)
TIMES_IN_AAA(one(R), S, RSS) → U36_AAA(R, S, RSS, times_in_aaa(R, S, RS))
TIMES_IN_AAA(one(R), S, RSS) → TIMES_IN_AAA(R, S, RS)
U36_AAA(R, S, RSS, times_out_aaa(R, S, RS)) → U37_AAA(R, S, RSS, add_in_aga(S, zero(RS), RSS))
U36_AAA(R, S, RSS, times_out_aaa(R, S, RS)) → ADD_IN_AGA(S, zero(RS), RSS)
ADD_IN_AGA(X, b, X) → U1_AGA(X, binaryZ_in_a(X))
ADD_IN_AGA(X, b, X) → BINARYZ_IN_A(X)
BINARYZ_IN_A(zero(X)) → U29_A(X, binaryZ_in_a(X))
BINARYZ_IN_A(zero(X)) → BINARYZ_IN_A(X)
BINARYZ_IN_A(one(X)) → U30_A(X, binary_in_a(X))
BINARYZ_IN_A(one(X)) → BINARY_IN_A(X)
BINARY_IN_A(zero(X)) → U27_A(X, binaryZ_in_a(X))
BINARY_IN_A(zero(X)) → BINARYZ_IN_A(X)
BINARY_IN_A(one(X)) → U28_A(X, binary_in_a(X))
BINARY_IN_A(one(X)) → BINARY_IN_A(X)
ADD_IN_AGA(b, Y, Y) → U2_AGA(Y, binaryZ_in_g(Y))
ADD_IN_AGA(b, Y, Y) → BINARYZ_IN_G(Y)
BINARYZ_IN_G(zero(X)) → U29_G(X, binaryZ_in_a(X))
BINARYZ_IN_G(zero(X)) → BINARYZ_IN_A(X)
BINARYZ_IN_G(one(X)) → U30_G(X, binary_in_g(X))
BINARYZ_IN_G(one(X)) → BINARY_IN_G(X)
BINARY_IN_G(zero(X)) → U27_G(X, binaryZ_in_a(X))
BINARY_IN_G(zero(X)) → BINARYZ_IN_A(X)
BINARY_IN_G(one(X)) → U28_G(X, binary_in_g(X))
BINARY_IN_G(one(X)) → BINARY_IN_G(X)
ADD_IN_AGA(X, Y, Z) → U3_AGA(X, Y, Z, addz_in_aga(X, Y, Z))
ADD_IN_AGA(X, Y, Z) → ADDZ_IN_AGA(X, Y, Z)
ADDZ_IN_AGA(zero(X), zero(Y), zero(Z)) → U10_AGA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AGA(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(zero(X), zero(Y), zero(Z)) → U10_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AAA(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(zero(X), one(Y), one(Z)) → U11_AAA(X, Y, Z, addx_in_aaa(X, Y, Z))
ADDZ_IN_AAA(zero(X), one(Y), one(Z)) → ADDX_IN_AAA(X, Y, Z)
ADDX_IN_AAA(one(X), b, one(X)) → U4_AAA(X, binary_in_a(X))
ADDX_IN_AAA(one(X), b, one(X)) → BINARY_IN_A(X)
ADDX_IN_AAA(zero(X), b, zero(X)) → U5_AAA(X, binaryZ_in_a(X))
ADDX_IN_AAA(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AAA(X, Y, Z) → U6_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDX_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(one(X), zero(Y), one(Z)) → U12_AAA(X, Y, Z, addy_in_aaa(X, Y, Z))
ADDZ_IN_AAA(one(X), zero(Y), one(Z)) → ADDY_IN_AAA(X, Y, Z)
ADDY_IN_AAA(b, one(Y), one(Y)) → U7_AAA(Y, binary_in_a(Y))
ADDY_IN_AAA(b, one(Y), one(Y)) → BINARY_IN_A(Y)
ADDY_IN_AAA(b, zero(Y), zero(Y)) → U8_AAA(Y, binaryZ_in_a(Y))
ADDY_IN_AAA(b, zero(Y), zero(Y)) → BINARYZ_IN_A(Y)
ADDY_IN_AAA(X, Y, Z) → U9_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDY_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(one(X), one(Y), zero(Z)) → U13_AAA(X, Y, Z, addc_in_aaa(X, Y, Z))
ADDZ_IN_AAA(one(X), one(Y), zero(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDC_IN_AAA(X, b, Z) → U14_AAA(X, Z, succZ_in_aa(X, Z))
ADDC_IN_AAA(X, b, Z) → SUCCZ_IN_AA(X, Z)
SUCCZ_IN_AA(zero(X), one(X)) → U33_AA(X, binaryZ_in_a(X))
SUCCZ_IN_AA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCCZ_IN_AA(one(X), zero(Z)) → U34_AA(X, Z, succ_in_aa(X, Z))
SUCCZ_IN_AA(one(X), zero(Z)) → SUCC_IN_AA(X, Z)
SUCC_IN_AA(zero(X), one(X)) → U31_AA(X, binaryZ_in_a(X))
SUCC_IN_AA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCC_IN_AA(one(X), zero(Z)) → U32_AA(X, Z, succ_in_aa(X, Z))
SUCC_IN_AA(one(X), zero(Z)) → SUCC_IN_AA(X, Z)
ADDC_IN_AAA(b, Y, Z) → U15_AAA(Y, Z, succZ_in_aa(Y, Z))
ADDC_IN_AAA(b, Y, Z) → SUCCZ_IN_AA(Y, Z)
ADDC_IN_AAA(X, Y, Z) → U16_AAA(X, Y, Z, addC_in_aaa(X, Y, Z))
ADDC_IN_AAA(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(zero(X), zero(Y), one(Z)) → U23_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDC_IN_AAA1(zero(X), zero(Y), one(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AAA1(zero(X), one(Y), zero(Z)) → U24_AAA(X, Y, Z, addX_in_aaa(X, Y, Z))
ADDC_IN_AAA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AAA1(X, Y, Z)
ADDX_IN_AAA1(zero(X), b, one(X)) → U17_AAA(X, binaryZ_in_a(X))
ADDX_IN_AAA1(zero(X), b, one(X)) → BINARYZ_IN_A(X)
ADDX_IN_AAA1(one(X), b, zero(Z)) → U18_AAA(X, Z, succ_in_aa(X, Z))
ADDX_IN_AAA1(one(X), b, zero(Z)) → SUCC_IN_AA(X, Z)
ADDX_IN_AAA1(X, Y, Z) → U19_AAA(X, Y, Z, addC_in_aaa(X, Y, Z))
ADDX_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(one(X), zero(Y), zero(Z)) → U25_AAA(X, Y, Z, addY_in_aaa(X, Y, Z))
ADDC_IN_AAA1(one(X), zero(Y), zero(Z)) → ADDY_IN_AAA1(X, Y, Z)
ADDY_IN_AAA1(b, zero(Y), one(Y)) → U20_AAA(Y, binaryZ_in_a(Y))
ADDY_IN_AAA1(b, zero(Y), one(Y)) → BINARYZ_IN_A(Y)
ADDY_IN_AAA1(b, one(Y), zero(Z)) → U21_AAA(Y, Z, succ_in_aa(Y, Z))
ADDY_IN_AAA1(b, one(Y), zero(Z)) → SUCC_IN_AA(Y, Z)
ADDY_IN_AAA1(X, Y, Z) → U22_AAA(X, Y, Z, addC_in_aaa(X, Y, Z))
ADDY_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(one(X), one(Y), one(Z)) → U26_AAA(X, Y, Z, addc_in_aaa(X, Y, Z))
ADDC_IN_AAA1(one(X), one(Y), one(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDZ_IN_AGA(zero(X), one(Y), one(Z)) → U11_AGA(X, Y, Z, addx_in_aga(X, Y, Z))
ADDZ_IN_AGA(zero(X), one(Y), one(Z)) → ADDX_IN_AGA(X, Y, Z)
ADDX_IN_AGA(one(X), b, one(X)) → U4_AGA(X, binary_in_a(X))
ADDX_IN_AGA(one(X), b, one(X)) → BINARY_IN_A(X)
ADDX_IN_AGA(zero(X), b, zero(X)) → U5_AGA(X, binaryZ_in_a(X))
ADDX_IN_AGA(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AGA(X, Y, Z) → U6_AGA(X, Y, Z, addz_in_aga(X, Y, Z))
ADDX_IN_AGA(X, Y, Z) → ADDZ_IN_AGA(X, Y, Z)
ADDZ_IN_AGA(one(X), zero(Y), one(Z)) → U12_AGA(X, Y, Z, addy_in_aaa(X, Y, Z))
ADDZ_IN_AGA(one(X), zero(Y), one(Z)) → ADDY_IN_AAA(X, Y, Z)
ADDZ_IN_AGA(one(X), one(Y), zero(Z)) → U13_AGA(X, Y, Z, addc_in_aga(X, Y, Z))
ADDZ_IN_AGA(one(X), one(Y), zero(Z)) → ADDC_IN_AGA(X, Y, Z)
ADDC_IN_AGA(X, b, Z) → U14_AGA(X, Z, succZ_in_aa(X, Z))
ADDC_IN_AGA(X, b, Z) → SUCCZ_IN_AA(X, Z)
ADDC_IN_AGA(b, Y, Z) → U15_AGA(Y, Z, succZ_in_ga(Y, Z))
ADDC_IN_AGA(b, Y, Z) → SUCCZ_IN_GA(Y, Z)
SUCCZ_IN_GA(zero(X), one(X)) → U33_GA(X, binaryZ_in_a(X))
SUCCZ_IN_GA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCCZ_IN_GA(one(X), zero(Z)) → U34_GA(X, Z, succ_in_ga(X, Z))
SUCCZ_IN_GA(one(X), zero(Z)) → SUCC_IN_GA(X, Z)
SUCC_IN_GA(zero(X), one(X)) → U31_GA(X, binaryZ_in_a(X))
SUCC_IN_GA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCC_IN_GA(one(X), zero(Z)) → U32_GA(X, Z, succ_in_ga(X, Z))
SUCC_IN_GA(one(X), zero(Z)) → SUCC_IN_GA(X, Z)
ADDC_IN_AGA(X, Y, Z) → U16_AGA(X, Y, Z, addC_in_aga(X, Y, Z))
ADDC_IN_AGA(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA1(zero(X), zero(Y), one(Z)) → U23_AGA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDC_IN_AGA1(zero(X), zero(Y), one(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AGA1(zero(X), one(Y), zero(Z)) → U24_AGA(X, Y, Z, addX_in_aga(X, Y, Z))
ADDC_IN_AGA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AGA1(X, Y, Z)
ADDX_IN_AGA1(zero(X), b, one(X)) → U17_AGA(X, binaryZ_in_a(X))
ADDX_IN_AGA1(zero(X), b, one(X)) → BINARYZ_IN_A(X)
ADDX_IN_AGA1(one(X), b, zero(Z)) → U18_AGA(X, Z, succ_in_aa(X, Z))
ADDX_IN_AGA1(one(X), b, zero(Z)) → SUCC_IN_AA(X, Z)
ADDX_IN_AGA1(X, Y, Z) → U19_AGA(X, Y, Z, addC_in_aga(X, Y, Z))
ADDX_IN_AGA1(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA1(one(X), zero(Y), zero(Z)) → U25_AGA(X, Y, Z, addY_in_aaa(X, Y, Z))
ADDC_IN_AGA1(one(X), zero(Y), zero(Z)) → ADDY_IN_AAA1(X, Y, Z)
ADDC_IN_AGA1(one(X), one(Y), one(Z)) → U26_AGA(X, Y, Z, addc_in_aga(X, Y, Z))
ADDC_IN_AGA1(one(X), one(Y), one(Z)) → ADDC_IN_AGA(X, Y, Z)
TIMES_IN_AAG(one(R), S, RSS) → U36_AAG(R, S, RSS, times_in_aaa(R, S, RS))
TIMES_IN_AAG(one(R), S, RSS) → TIMES_IN_AAA(R, S, RS)
U36_AAG(R, S, RSS, times_out_aaa(R, S, RS)) → U37_AAG(R, S, RSS, add_in_agg(S, zero(RS), RSS))
U36_AAG(R, S, RSS, times_out_aaa(R, S, RS)) → ADD_IN_AGG(S, zero(RS), RSS)
ADD_IN_AGG(X, b, X) → U1_AGG(X, binaryZ_in_g(X))
ADD_IN_AGG(X, b, X) → BINARYZ_IN_G(X)
ADD_IN_AGG(b, Y, Y) → U2_AGG(Y, binaryZ_in_g(Y))
ADD_IN_AGG(b, Y, Y) → BINARYZ_IN_G(Y)
ADD_IN_AGG(X, Y, Z) → U3_AGG(X, Y, Z, addz_in_agg(X, Y, Z))
ADD_IN_AGG(X, Y, Z) → ADDZ_IN_AGG(X, Y, Z)
ADDZ_IN_AGG(zero(X), zero(Y), zero(Z)) → U10_AGG(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AGG(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AGG(zero(X), one(Y), one(Z)) → U11_AGG(X, Y, Z, addx_in_agg(X, Y, Z))
ADDZ_IN_AGG(zero(X), one(Y), one(Z)) → ADDX_IN_AGG(X, Y, Z)
ADDX_IN_AGG(one(X), b, one(X)) → U4_AGG(X, binary_in_g(X))
ADDX_IN_AGG(one(X), b, one(X)) → BINARY_IN_G(X)
ADDX_IN_AGG(zero(X), b, zero(X)) → U5_AGG(X, binaryZ_in_a(X))
ADDX_IN_AGG(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AGG(X, Y, Z) → U6_AGG(X, Y, Z, addz_in_agg(X, Y, Z))
ADDX_IN_AGG(X, Y, Z) → ADDZ_IN_AGG(X, Y, Z)
ADDZ_IN_AGG(one(X), zero(Y), one(Z)) → U12_AGG(X, Y, Z, addy_in_aag(X, Y, Z))
ADDZ_IN_AGG(one(X), zero(Y), one(Z)) → ADDY_IN_AAG(X, Y, Z)
ADDY_IN_AAG(b, one(Y), one(Y)) → U7_AAG(Y, binary_in_g(Y))
ADDY_IN_AAG(b, one(Y), one(Y)) → BINARY_IN_G(Y)
ADDY_IN_AAG(b, zero(Y), zero(Y)) → U8_AAG(Y, binaryZ_in_a(Y))
ADDY_IN_AAG(b, zero(Y), zero(Y)) → BINARYZ_IN_A(Y)
ADDY_IN_AAG(X, Y, Z) → U9_AAG(X, Y, Z, addz_in_aag(X, Y, Z))
ADDY_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(zero(X), zero(Y), zero(Z)) → U10_AAG(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AAG(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAG(zero(X), one(Y), one(Z)) → U11_AAG(X, Y, Z, addx_in_aag(X, Y, Z))
ADDZ_IN_AAG(zero(X), one(Y), one(Z)) → ADDX_IN_AAG(X, Y, Z)
ADDX_IN_AAG(one(X), b, one(X)) → U4_AAG(X, binary_in_g(X))
ADDX_IN_AAG(one(X), b, one(X)) → BINARY_IN_G(X)
ADDX_IN_AAG(zero(X), b, zero(X)) → U5_AAG(X, binaryZ_in_a(X))
ADDX_IN_AAG(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AAG(X, Y, Z) → U6_AAG(X, Y, Z, addz_in_aag(X, Y, Z))
ADDX_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(one(X), zero(Y), one(Z)) → U12_AAG(X, Y, Z, addy_in_aag(X, Y, Z))
ADDZ_IN_AAG(one(X), zero(Y), one(Z)) → ADDY_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(one(X), one(Y), zero(Z)) → U13_AAG(X, Y, Z, addc_in_aaa(X, Y, Z))
ADDZ_IN_AAG(one(X), one(Y), zero(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDZ_IN_AGG(one(X), one(Y), zero(Z)) → U13_AGG(X, Y, Z, addc_in_aga(X, Y, Z))
ADDZ_IN_AGG(one(X), one(Y), zero(Z)) → ADDC_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)
U26_AGA(x1, x2, x3, x4)  =  U26_AGA(x4)
U18_AGA(x1, x2, x3)  =  U18_AGA(x3)
U5_AAG(x1, x2)  =  U5_AAG(x2)
U28_A(x1, x2)  =  U28_A(x2)
U9_AAG(x1, x2, x3, x4)  =  U9_AAG(x4)
U3_AGA(x1, x2, x3, x4)  =  U3_AGA(x4)
U24_AGA(x1, x2, x3, x4)  =  U24_AGA(x4)
U13_AAG(x1, x2, x3, x4)  =  U13_AAG(x4)
U22_AAA(x1, x2, x3, x4)  =  U22_AAA(x4)
SUCC_IN_GA(x1, x2)  =  SUCC_IN_GA(x1)
U6_AGA(x1, x2, x3, x4)  =  U6_AGA(x4)
SUCC_IN_AA(x1, x2)  =  SUCC_IN_AA
U30_G(x1, x2)  =  U30_G(x2)
U31_AA(x1, x2)  =  U31_AA(x2)
U20_AAA(x1, x2)  =  U20_AAA(x2)
ADD_IN_AGG(x1, x2, x3)  =  ADD_IN_AGG(x2, x3)
U37_AAA(x1, x2, x3, x4)  =  U37_AAA(x1, x4)
ADDY_IN_AAA(x1, x2, x3)  =  ADDY_IN_AAA
U11_AAG(x1, x2, x3, x4)  =  U11_AAG(x4)
ADDX_IN_AGG(x1, x2, x3)  =  ADDX_IN_AGG(x2, x3)
BINARYZ_IN_G(x1)  =  BINARYZ_IN_G(x1)
U33_GA(x1, x2)  =  U33_GA(x2)
U4_AGG(x1, x2)  =  U4_AGG(x1, x2)
U15_AAA(x1, x2, x3)  =  U15_AAA(x3)
ADDX_IN_AGA1(x1, x2, x3)  =  ADDX_IN_AGA1(x2)
U12_AGA(x1, x2, x3, x4)  =  U12_AGA(x4)
U32_GA(x1, x2, x3)  =  U32_GA(x3)
U21_AAA(x1, x2, x3)  =  U21_AAA(x3)
BINARY_IN_A(x1)  =  BINARY_IN_A
U23_AAA(x1, x2, x3, x4)  =  U23_AAA(x4)
U8_AAA(x1, x2)  =  U8_AAA(x2)
TIMES_IN_AAG(x1, x2, x3)  =  TIMES_IN_AAG(x3)
ADDX_IN_AAG(x1, x2, x3)  =  ADDX_IN_AAG(x3)
U17_AAA(x1, x2)  =  U17_AAA(x2)
U26_AAA(x1, x2, x3, x4)  =  U26_AAA(x4)
U11_AAA(x1, x2, x3, x4)  =  U11_AAA(x4)
TIMES_IN_AAA(x1, x2, x3)  =  TIMES_IN_AAA
SUCCZ_IN_AA(x1, x2)  =  SUCCZ_IN_AA
U27_A(x1, x2)  =  U27_A(x2)
U5_AGG(x1, x2)  =  U5_AGG(x2)
U1_AGG(x1, x2)  =  U1_AGG(x1, x2)
BINARYZ_IN_A(x1)  =  BINARYZ_IN_A
ADDC_IN_AAA(x1, x2, x3)  =  ADDC_IN_AAA
U35_AAA(x1, x2, x3, x4)  =  U35_AAA(x4)
U9_AAA(x1, x2, x3, x4)  =  U9_AAA(x4)
U6_AGG(x1, x2, x3, x4)  =  U6_AGG(x4)
ADDZ_IN_AGG(x1, x2, x3)  =  ADDZ_IN_AGG(x2, x3)
U12_AAG(x1, x2, x3, x4)  =  U12_AAG(x4)
U4_AAA(x1, x2)  =  U4_AAA(x2)
ADD_IN_AGA(x1, x2, x3)  =  ADD_IN_AGA(x2)
U25_AAA(x1, x2, x3, x4)  =  U25_AAA(x4)
ADDC_IN_AGA1(x1, x2, x3)  =  ADDC_IN_AGA1(x2)
U14_AAA(x1, x2, x3)  =  U14_AAA(x3)
U6_AAG(x1, x2, x3, x4)  =  U6_AAG(x4)
ADDY_IN_AAG(x1, x2, x3)  =  ADDY_IN_AAG(x3)
U25_AGA(x1, x2, x3, x4)  =  U25_AGA(x4)
U24_AAA(x1, x2, x3, x4)  =  U24_AAA(x4)
ADDX_IN_AAA(x1, x2, x3)  =  ADDX_IN_AAA
U4_AAG(x1, x2)  =  U4_AAG(x1, x2)
U29_G(x1, x2)  =  U29_G(x2)
U1_AGA(x1, x2)  =  U1_AGA(x2)
U2_AGA(x1, x2)  =  U2_AGA(x1, x2)
ADDC_IN_AGA(x1, x2, x3)  =  ADDC_IN_AGA(x2)
ADDZ_IN_AAG(x1, x2, x3)  =  ADDZ_IN_AAG(x3)
U27_G(x1, x2)  =  U27_G(x2)
U32_AA(x1, x2, x3)  =  U32_AA(x3)
U12_AGG(x1, x2, x3, x4)  =  U12_AGG(x4)
U36_AAG(x1, x2, x3, x4)  =  U36_AAG(x3, x4)
U28_G(x1, x2)  =  U28_G(x2)
U16_AAA(x1, x2, x3, x4)  =  U16_AAA(x4)
U13_AGG(x1, x2, x3, x4)  =  U13_AGG(x4)
U19_AGA(x1, x2, x3, x4)  =  U19_AGA(x4)
U4_AGA(x1, x2)  =  U4_AGA(x2)
U11_AGA(x1, x2, x3, x4)  =  U11_AGA(x4)
U2_AGG(x1, x2)  =  U2_AGG(x2)
ADDY_IN_AAA1(x1, x2, x3)  =  ADDY_IN_AAA1
U16_AGA(x1, x2, x3, x4)  =  U16_AGA(x4)
U15_AGA(x1, x2, x3)  =  U15_AGA(x3)
U5_AAA(x1, x2)  =  U5_AAA(x2)
BINARY_IN_G(x1)  =  BINARY_IN_G(x1)
SUCCZ_IN_GA(x1, x2)  =  SUCCZ_IN_GA(x1)
U10_AGA(x1, x2, x3, x4)  =  U10_AGA(x4)
U3_AGG(x1, x2, x3, x4)  =  U3_AGG(x4)
U13_AAA(x1, x2, x3, x4)  =  U13_AAA(x4)
U13_AGA(x1, x2, x3, x4)  =  U13_AGA(x4)
U7_AAG(x1, x2)  =  U7_AAG(x1, x2)
U7_AAA(x1, x2)  =  U7_AAA(x2)
U12_AAA(x1, x2, x3, x4)  =  U12_AAA(x4)
U34_AA(x1, x2, x3)  =  U34_AA(x3)
U37_AAG(x1, x2, x3, x4)  =  U37_AAG(x1, x4)
U8_AAG(x1, x2)  =  U8_AAG(x2)
U35_AAG(x1, x2, x3, x4)  =  U35_AAG(x4)
U17_AGA(x1, x2)  =  U17_AGA(x2)
ADDZ_IN_AAA(x1, x2, x3)  =  ADDZ_IN_AAA
U10_AAA(x1, x2, x3, x4)  =  U10_AAA(x4)
U23_AGA(x1, x2, x3, x4)  =  U23_AGA(x4)
ADDC_IN_AAA1(x1, x2, x3)  =  ADDC_IN_AAA1
U6_AAA(x1, x2, x3, x4)  =  U6_AAA(x4)
U14_AGA(x1, x2, x3)  =  U14_AGA(x3)
U18_AAA(x1, x2, x3)  =  U18_AAA(x3)
U30_A(x1, x2)  =  U30_A(x2)
U10_AGG(x1, x2, x3, x4)  =  U10_AGG(x4)
U34_GA(x1, x2, x3)  =  U34_GA(x3)
U36_AAA(x1, x2, x3, x4)  =  U36_AAA(x4)
ADDZ_IN_AGA(x1, x2, x3)  =  ADDZ_IN_AGA(x2)
U5_AGA(x1, x2)  =  U5_AGA(x2)
U19_AAA(x1, x2, x3, x4)  =  U19_AAA(x4)
U10_AAG(x1, x2, x3, x4)  =  U10_AAG(x4)
U11_AGG(x1, x2, x3, x4)  =  U11_AGG(x4)
U33_AA(x1, x2)  =  U33_AA(x2)
U31_GA(x1, x2)  =  U31_GA(x2)
ADDX_IN_AAA1(x1, x2, x3)  =  ADDX_IN_AAA1
U29_A(x1, x2)  =  U29_A(x2)
ADDX_IN_AGA(x1, x2, x3)  =  ADDX_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 10 SCCs with 136 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

BINARY_IN_A(one(X)) → BINARY_IN_A(X)
BINARYZ_IN_A(one(X)) → BINARY_IN_A(X)
BINARY_IN_A(zero(X)) → BINARYZ_IN_A(X)
BINARYZ_IN_A(zero(X)) → BINARYZ_IN_A(X)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)
BINARY_IN_A(x1)  =  BINARY_IN_A
BINARYZ_IN_A(x1)  =  BINARYZ_IN_A

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

BINARY_IN_A(one(X)) → BINARY_IN_A(X)
BINARYZ_IN_A(one(X)) → BINARY_IN_A(X)
BINARY_IN_A(zero(X)) → BINARYZ_IN_A(X)
BINARYZ_IN_A(zero(X)) → BINARYZ_IN_A(X)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
BINARY_IN_A(x1)  =  BINARY_IN_A
BINARYZ_IN_A(x1)  =  BINARYZ_IN_A

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

BINARYZ_IN_ABINARYZ_IN_A
BINARY_IN_ABINARY_IN_A
BINARY_IN_ABINARYZ_IN_A
BINARYZ_IN_ABINARY_IN_A

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

BINARYZ_IN_ABINARYZ_IN_A
BINARY_IN_ABINARY_IN_A
BINARY_IN_ABINARYZ_IN_A
BINARYZ_IN_ABINARY_IN_A

The TRS R consists of the following rules:none


s = BINARYZ_IN_A evaluates to t =BINARYZ_IN_A

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from BINARYZ_IN_A to BINARYZ_IN_A.





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

SUCC_IN_GA(one(X), zero(Z)) → SUCC_IN_GA(X, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)
SUCC_IN_GA(x1, x2)  =  SUCC_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

SUCC_IN_GA(one(X), zero(Z)) → SUCC_IN_GA(X, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
SUCC_IN_GA(x1, x2)  =  SUCC_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

SUCC_IN_GA(one(X)) → SUCC_IN_GA(X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

SUCC_IN_AA(one(X), zero(Z)) → SUCC_IN_AA(X, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)
SUCC_IN_AA(x1, x2)  =  SUCC_IN_AA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

SUCC_IN_AA(one(X), zero(Z)) → SUCC_IN_AA(X, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
SUCC_IN_AA(x1, x2)  =  SUCC_IN_AA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

SUCC_IN_AASUCC_IN_AA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

SUCC_IN_AASUCC_IN_AA

The TRS R consists of the following rules:none


s = SUCC_IN_AA evaluates to t =SUCC_IN_AA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from SUCC_IN_AA to SUCC_IN_AA.





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

ADDZ_IN_AAA(one(X), zero(Y), one(Z)) → ADDY_IN_AAA(X, Y, Z)
ADDY_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDY_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDX_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(one(X), one(Y), one(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDC_IN_AAA1(one(X), zero(Y), zero(Z)) → ADDY_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AAA1(X, Y, Z)
ADDZ_IN_AAA(one(X), one(Y), zero(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDX_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AAA1(zero(X), zero(Y), one(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AAA(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDZ_IN_AAA(zero(X), one(Y), one(Z)) → ADDX_IN_AAA(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)
ADDY_IN_AAA(x1, x2, x3)  =  ADDY_IN_AAA
ADDC_IN_AAA(x1, x2, x3)  =  ADDC_IN_AAA
ADDX_IN_AAA(x1, x2, x3)  =  ADDX_IN_AAA
ADDY_IN_AAA1(x1, x2, x3)  =  ADDY_IN_AAA1
ADDZ_IN_AAA(x1, x2, x3)  =  ADDZ_IN_AAA
ADDC_IN_AAA1(x1, x2, x3)  =  ADDC_IN_AAA1
ADDX_IN_AAA1(x1, x2, x3)  =  ADDX_IN_AAA1

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

ADDZ_IN_AAA(one(X), zero(Y), one(Z)) → ADDY_IN_AAA(X, Y, Z)
ADDY_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDY_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDX_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(one(X), one(Y), one(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDC_IN_AAA1(one(X), zero(Y), zero(Z)) → ADDY_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AAA1(X, Y, Z)
ADDZ_IN_AAA(one(X), one(Y), zero(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDX_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AAA1(zero(X), zero(Y), one(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AAA(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDZ_IN_AAA(zero(X), one(Y), one(Z)) → ADDX_IN_AAA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
ADDY_IN_AAA(x1, x2, x3)  =  ADDY_IN_AAA
ADDC_IN_AAA(x1, x2, x3)  =  ADDC_IN_AAA
ADDX_IN_AAA(x1, x2, x3)  =  ADDX_IN_AAA
ADDY_IN_AAA1(x1, x2, x3)  =  ADDY_IN_AAA1
ADDZ_IN_AAA(x1, x2, x3)  =  ADDZ_IN_AAA
ADDC_IN_AAA1(x1, x2, x3)  =  ADDC_IN_AAA1
ADDX_IN_AAA1(x1, x2, x3)  =  ADDX_IN_AAA1

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

ADDC_IN_AAA1ADDC_IN_AAA
ADDC_IN_AAA1ADDX_IN_AAA1
ADDC_IN_AAAADDC_IN_AAA1
ADDC_IN_AAA1ADDZ_IN_AAA
ADDZ_IN_AAAADDX_IN_AAA
ADDY_IN_AAAADDZ_IN_AAA
ADDX_IN_AAAADDZ_IN_AAA
ADDZ_IN_AAAADDY_IN_AAA
ADDY_IN_AAA1ADDC_IN_AAA1
ADDZ_IN_AAAADDC_IN_AAA
ADDC_IN_AAA1ADDY_IN_AAA1
ADDZ_IN_AAAADDZ_IN_AAA
ADDX_IN_AAA1ADDC_IN_AAA1

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

ADDC_IN_AAA1ADDC_IN_AAA
ADDC_IN_AAA1ADDX_IN_AAA1
ADDC_IN_AAAADDC_IN_AAA1
ADDC_IN_AAA1ADDZ_IN_AAA
ADDZ_IN_AAAADDX_IN_AAA
ADDY_IN_AAAADDZ_IN_AAA
ADDX_IN_AAAADDZ_IN_AAA
ADDZ_IN_AAAADDY_IN_AAA
ADDY_IN_AAA1ADDC_IN_AAA1
ADDZ_IN_AAAADDC_IN_AAA
ADDC_IN_AAA1ADDY_IN_AAA1
ADDZ_IN_AAAADDZ_IN_AAA
ADDX_IN_AAA1ADDC_IN_AAA1

The TRS R consists of the following rules:none


s = ADDZ_IN_AAA evaluates to t =ADDZ_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from ADDZ_IN_AAA to ADDZ_IN_AAA.





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGA1(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA1(one(X), one(Y), one(Z)) → ADDC_IN_AGA(X, Y, Z)
ADDC_IN_AGA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AGA1(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)
ADDX_IN_AGA1(x1, x2, x3)  =  ADDX_IN_AGA1(x2)
ADDC_IN_AGA1(x1, x2, x3)  =  ADDC_IN_AGA1(x2)
ADDC_IN_AGA(x1, x2, x3)  =  ADDC_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGA1(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA1(one(X), one(Y), one(Z)) → ADDC_IN_AGA(X, Y, Z)
ADDC_IN_AGA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AGA1(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
ADDX_IN_AGA1(x1, x2, x3)  =  ADDX_IN_AGA1(x2)
ADDC_IN_AGA1(x1, x2, x3)  =  ADDC_IN_AGA1(x2)
ADDC_IN_AGA(x1, x2, x3)  =  ADDC_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

ADDC_IN_AGA(Y) → ADDC_IN_AGA1(Y)
ADDX_IN_AGA1(Y) → ADDC_IN_AGA1(Y)
ADDC_IN_AGA1(one(Y)) → ADDX_IN_AGA1(Y)
ADDC_IN_AGA1(one(Y)) → ADDC_IN_AGA(Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGA(X, Y, Z) → ADDZ_IN_AGA(X, Y, Z)
ADDZ_IN_AGA(zero(X), one(Y), one(Z)) → ADDX_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)
ADDZ_IN_AGA(x1, x2, x3)  =  ADDZ_IN_AGA(x2)
ADDX_IN_AGA(x1, x2, x3)  =  ADDX_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGA(X, Y, Z) → ADDZ_IN_AGA(X, Y, Z)
ADDZ_IN_AGA(zero(X), one(Y), one(Z)) → ADDX_IN_AGA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
ADDZ_IN_AGA(x1, x2, x3)  =  ADDZ_IN_AGA(x2)
ADDX_IN_AGA(x1, x2, x3)  =  ADDX_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGA(Y) → ADDZ_IN_AGA(Y)
ADDZ_IN_AGA(one(Y)) → ADDX_IN_AGA(Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

BINARY_IN_G(one(X)) → BINARY_IN_G(X)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)
BINARY_IN_G(x1)  =  BINARY_IN_G(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

BINARY_IN_G(one(X)) → BINARY_IN_G(X)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

BINARY_IN_G(one(X)) → BINARY_IN_G(X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

ADDZ_IN_AAG(zero(X), one(Y), one(Z)) → ADDX_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(one(X), zero(Y), one(Z)) → ADDY_IN_AAG(X, Y, Z)
ADDX_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)
ADDY_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)
ADDX_IN_AAG(x1, x2, x3)  =  ADDX_IN_AAG(x3)
ADDY_IN_AAG(x1, x2, x3)  =  ADDY_IN_AAG(x3)
ADDZ_IN_AAG(x1, x2, x3)  =  ADDZ_IN_AAG(x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

ADDZ_IN_AAG(zero(X), one(Y), one(Z)) → ADDX_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(one(X), zero(Y), one(Z)) → ADDY_IN_AAG(X, Y, Z)
ADDX_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)
ADDY_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
ADDX_IN_AAG(x1, x2, x3)  =  ADDX_IN_AAG(x3)
ADDY_IN_AAG(x1, x2, x3)  =  ADDY_IN_AAG(x3)
ADDZ_IN_AAG(x1, x2, x3)  =  ADDZ_IN_AAG(x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

ADDY_IN_AAG(Z) → ADDZ_IN_AAG(Z)
ADDZ_IN_AAG(one(Z)) → ADDX_IN_AAG(Z)
ADDX_IN_AAG(Z) → ADDZ_IN_AAG(Z)
ADDZ_IN_AAG(one(Z)) → ADDY_IN_AAG(Z)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGG(X, Y, Z) → ADDZ_IN_AGG(X, Y, Z)
ADDZ_IN_AGG(zero(X), one(Y), one(Z)) → ADDX_IN_AGG(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)
ADDX_IN_AGG(x1, x2, x3)  =  ADDX_IN_AGG(x2, x3)
ADDZ_IN_AGG(x1, x2, x3)  =  ADDZ_IN_AGG(x2, x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGG(X, Y, Z) → ADDZ_IN_AGG(X, Y, Z)
ADDZ_IN_AGG(zero(X), one(Y), one(Z)) → ADDX_IN_AGG(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
ADDX_IN_AGG(x1, x2, x3)  =  ADDX_IN_AGG(x2, x3)
ADDZ_IN_AGG(x1, x2, x3)  =  ADDZ_IN_AGG(x2, x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGG(Y, Z) → ADDZ_IN_AGG(Y, Z)
ADDZ_IN_AGG(one(Y), one(Z)) → ADDX_IN_AGG(Y, Z)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

TIMES_IN_AAA(one(R), S, RSS) → TIMES_IN_AAA(R, S, RS)
TIMES_IN_AAA(zero(R), S, zero(RS)) → TIMES_IN_AAA(R, S, RS)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x2)
U34_ga(x1, x2, x3)  =  U34_ga(x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x4)
TIMES_IN_AAA(x1, x2, x3)  =  TIMES_IN_AAA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

TIMES_IN_AAA(one(R), S, RSS) → TIMES_IN_AAA(R, S, RS)
TIMES_IN_AAA(zero(R), S, zero(RS)) → TIMES_IN_AAA(R, S, RS)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
TIMES_IN_AAA(x1, x2, x3)  =  TIMES_IN_AAA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

TIMES_IN_AAATIMES_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

TIMES_IN_AAATIMES_IN_AAA

The TRS R consists of the following rules:none


s = TIMES_IN_AAA evaluates to t =TIMES_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from TIMES_IN_AAA to TIMES_IN_AAA.




We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
times_in: (f,f,b) (f,f,f)
add_in: (f,b,f) (f,b,b)
binaryZ_in: (f) (b)
binary_in: (f) (b)
addz_in: (f,b,f) (f,f,f) (f,b,b) (f,f,b)
addx_in: (f,f,f) (f,b,f) (f,b,b) (f,f,b)
addy_in: (f,f,f) (f,f,b)
addc_in: (f,f,f) (f,b,f)
succZ_in: (f,f) (b,f)
succ_in: (f,f) (b,f)
addC_in: (f,f,f) (f,b,f)
addX_in: (f,f,f) (f,b,f)
addY_in: (f,f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

TIMES_IN_AAG(zero(R), S, zero(RS)) → U35_AAG(R, S, RS, times_in_aaa(R, S, RS))
TIMES_IN_AAG(zero(R), S, zero(RS)) → TIMES_IN_AAA(R, S, RS)
TIMES_IN_AAA(zero(R), S, zero(RS)) → U35_AAA(R, S, RS, times_in_aaa(R, S, RS))
TIMES_IN_AAA(zero(R), S, zero(RS)) → TIMES_IN_AAA(R, S, RS)
TIMES_IN_AAA(one(R), S, RSS) → U36_AAA(R, S, RSS, times_in_aaa(R, S, RS))
TIMES_IN_AAA(one(R), S, RSS) → TIMES_IN_AAA(R, S, RS)
U36_AAA(R, S, RSS, times_out_aaa(R, S, RS)) → U37_AAA(R, S, RSS, add_in_aga(S, zero(RS), RSS))
U36_AAA(R, S, RSS, times_out_aaa(R, S, RS)) → ADD_IN_AGA(S, zero(RS), RSS)
ADD_IN_AGA(X, b, X) → U1_AGA(X, binaryZ_in_a(X))
ADD_IN_AGA(X, b, X) → BINARYZ_IN_A(X)
BINARYZ_IN_A(zero(X)) → U29_A(X, binaryZ_in_a(X))
BINARYZ_IN_A(zero(X)) → BINARYZ_IN_A(X)
BINARYZ_IN_A(one(X)) → U30_A(X, binary_in_a(X))
BINARYZ_IN_A(one(X)) → BINARY_IN_A(X)
BINARY_IN_A(zero(X)) → U27_A(X, binaryZ_in_a(X))
BINARY_IN_A(zero(X)) → BINARYZ_IN_A(X)
BINARY_IN_A(one(X)) → U28_A(X, binary_in_a(X))
BINARY_IN_A(one(X)) → BINARY_IN_A(X)
ADD_IN_AGA(b, Y, Y) → U2_AGA(Y, binaryZ_in_g(Y))
ADD_IN_AGA(b, Y, Y) → BINARYZ_IN_G(Y)
BINARYZ_IN_G(zero(X)) → U29_G(X, binaryZ_in_a(X))
BINARYZ_IN_G(zero(X)) → BINARYZ_IN_A(X)
BINARYZ_IN_G(one(X)) → U30_G(X, binary_in_g(X))
BINARYZ_IN_G(one(X)) → BINARY_IN_G(X)
BINARY_IN_G(zero(X)) → U27_G(X, binaryZ_in_a(X))
BINARY_IN_G(zero(X)) → BINARYZ_IN_A(X)
BINARY_IN_G(one(X)) → U28_G(X, binary_in_g(X))
BINARY_IN_G(one(X)) → BINARY_IN_G(X)
ADD_IN_AGA(X, Y, Z) → U3_AGA(X, Y, Z, addz_in_aga(X, Y, Z))
ADD_IN_AGA(X, Y, Z) → ADDZ_IN_AGA(X, Y, Z)
ADDZ_IN_AGA(zero(X), zero(Y), zero(Z)) → U10_AGA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AGA(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(zero(X), zero(Y), zero(Z)) → U10_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AAA(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(zero(X), one(Y), one(Z)) → U11_AAA(X, Y, Z, addx_in_aaa(X, Y, Z))
ADDZ_IN_AAA(zero(X), one(Y), one(Z)) → ADDX_IN_AAA(X, Y, Z)
ADDX_IN_AAA(one(X), b, one(X)) → U4_AAA(X, binary_in_a(X))
ADDX_IN_AAA(one(X), b, one(X)) → BINARY_IN_A(X)
ADDX_IN_AAA(zero(X), b, zero(X)) → U5_AAA(X, binaryZ_in_a(X))
ADDX_IN_AAA(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AAA(X, Y, Z) → U6_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDX_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(one(X), zero(Y), one(Z)) → U12_AAA(X, Y, Z, addy_in_aaa(X, Y, Z))
ADDZ_IN_AAA(one(X), zero(Y), one(Z)) → ADDY_IN_AAA(X, Y, Z)
ADDY_IN_AAA(b, one(Y), one(Y)) → U7_AAA(Y, binary_in_a(Y))
ADDY_IN_AAA(b, one(Y), one(Y)) → BINARY_IN_A(Y)
ADDY_IN_AAA(b, zero(Y), zero(Y)) → U8_AAA(Y, binaryZ_in_a(Y))
ADDY_IN_AAA(b, zero(Y), zero(Y)) → BINARYZ_IN_A(Y)
ADDY_IN_AAA(X, Y, Z) → U9_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDY_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(one(X), one(Y), zero(Z)) → U13_AAA(X, Y, Z, addc_in_aaa(X, Y, Z))
ADDZ_IN_AAA(one(X), one(Y), zero(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDC_IN_AAA(X, b, Z) → U14_AAA(X, Z, succZ_in_aa(X, Z))
ADDC_IN_AAA(X, b, Z) → SUCCZ_IN_AA(X, Z)
SUCCZ_IN_AA(zero(X), one(X)) → U33_AA(X, binaryZ_in_a(X))
SUCCZ_IN_AA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCCZ_IN_AA(one(X), zero(Z)) → U34_AA(X, Z, succ_in_aa(X, Z))
SUCCZ_IN_AA(one(X), zero(Z)) → SUCC_IN_AA(X, Z)
SUCC_IN_AA(zero(X), one(X)) → U31_AA(X, binaryZ_in_a(X))
SUCC_IN_AA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCC_IN_AA(one(X), zero(Z)) → U32_AA(X, Z, succ_in_aa(X, Z))
SUCC_IN_AA(one(X), zero(Z)) → SUCC_IN_AA(X, Z)
ADDC_IN_AAA(b, Y, Z) → U15_AAA(Y, Z, succZ_in_aa(Y, Z))
ADDC_IN_AAA(b, Y, Z) → SUCCZ_IN_AA(Y, Z)
ADDC_IN_AAA(X, Y, Z) → U16_AAA(X, Y, Z, addC_in_aaa(X, Y, Z))
ADDC_IN_AAA(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(zero(X), zero(Y), one(Z)) → U23_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDC_IN_AAA1(zero(X), zero(Y), one(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AAA1(zero(X), one(Y), zero(Z)) → U24_AAA(X, Y, Z, addX_in_aaa(X, Y, Z))
ADDC_IN_AAA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AAA1(X, Y, Z)
ADDX_IN_AAA1(zero(X), b, one(X)) → U17_AAA(X, binaryZ_in_a(X))
ADDX_IN_AAA1(zero(X), b, one(X)) → BINARYZ_IN_A(X)
ADDX_IN_AAA1(one(X), b, zero(Z)) → U18_AAA(X, Z, succ_in_aa(X, Z))
ADDX_IN_AAA1(one(X), b, zero(Z)) → SUCC_IN_AA(X, Z)
ADDX_IN_AAA1(X, Y, Z) → U19_AAA(X, Y, Z, addC_in_aaa(X, Y, Z))
ADDX_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(one(X), zero(Y), zero(Z)) → U25_AAA(X, Y, Z, addY_in_aaa(X, Y, Z))
ADDC_IN_AAA1(one(X), zero(Y), zero(Z)) → ADDY_IN_AAA1(X, Y, Z)
ADDY_IN_AAA1(b, zero(Y), one(Y)) → U20_AAA(Y, binaryZ_in_a(Y))
ADDY_IN_AAA1(b, zero(Y), one(Y)) → BINARYZ_IN_A(Y)
ADDY_IN_AAA1(b, one(Y), zero(Z)) → U21_AAA(Y, Z, succ_in_aa(Y, Z))
ADDY_IN_AAA1(b, one(Y), zero(Z)) → SUCC_IN_AA(Y, Z)
ADDY_IN_AAA1(X, Y, Z) → U22_AAA(X, Y, Z, addC_in_aaa(X, Y, Z))
ADDY_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(one(X), one(Y), one(Z)) → U26_AAA(X, Y, Z, addc_in_aaa(X, Y, Z))
ADDC_IN_AAA1(one(X), one(Y), one(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDZ_IN_AGA(zero(X), one(Y), one(Z)) → U11_AGA(X, Y, Z, addx_in_aga(X, Y, Z))
ADDZ_IN_AGA(zero(X), one(Y), one(Z)) → ADDX_IN_AGA(X, Y, Z)
ADDX_IN_AGA(one(X), b, one(X)) → U4_AGA(X, binary_in_a(X))
ADDX_IN_AGA(one(X), b, one(X)) → BINARY_IN_A(X)
ADDX_IN_AGA(zero(X), b, zero(X)) → U5_AGA(X, binaryZ_in_a(X))
ADDX_IN_AGA(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AGA(X, Y, Z) → U6_AGA(X, Y, Z, addz_in_aga(X, Y, Z))
ADDX_IN_AGA(X, Y, Z) → ADDZ_IN_AGA(X, Y, Z)
ADDZ_IN_AGA(one(X), zero(Y), one(Z)) → U12_AGA(X, Y, Z, addy_in_aaa(X, Y, Z))
ADDZ_IN_AGA(one(X), zero(Y), one(Z)) → ADDY_IN_AAA(X, Y, Z)
ADDZ_IN_AGA(one(X), one(Y), zero(Z)) → U13_AGA(X, Y, Z, addc_in_aga(X, Y, Z))
ADDZ_IN_AGA(one(X), one(Y), zero(Z)) → ADDC_IN_AGA(X, Y, Z)
ADDC_IN_AGA(X, b, Z) → U14_AGA(X, Z, succZ_in_aa(X, Z))
ADDC_IN_AGA(X, b, Z) → SUCCZ_IN_AA(X, Z)
ADDC_IN_AGA(b, Y, Z) → U15_AGA(Y, Z, succZ_in_ga(Y, Z))
ADDC_IN_AGA(b, Y, Z) → SUCCZ_IN_GA(Y, Z)
SUCCZ_IN_GA(zero(X), one(X)) → U33_GA(X, binaryZ_in_a(X))
SUCCZ_IN_GA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCCZ_IN_GA(one(X), zero(Z)) → U34_GA(X, Z, succ_in_ga(X, Z))
SUCCZ_IN_GA(one(X), zero(Z)) → SUCC_IN_GA(X, Z)
SUCC_IN_GA(zero(X), one(X)) → U31_GA(X, binaryZ_in_a(X))
SUCC_IN_GA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCC_IN_GA(one(X), zero(Z)) → U32_GA(X, Z, succ_in_ga(X, Z))
SUCC_IN_GA(one(X), zero(Z)) → SUCC_IN_GA(X, Z)
ADDC_IN_AGA(X, Y, Z) → U16_AGA(X, Y, Z, addC_in_aga(X, Y, Z))
ADDC_IN_AGA(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA1(zero(X), zero(Y), one(Z)) → U23_AGA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDC_IN_AGA1(zero(X), zero(Y), one(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AGA1(zero(X), one(Y), zero(Z)) → U24_AGA(X, Y, Z, addX_in_aga(X, Y, Z))
ADDC_IN_AGA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AGA1(X, Y, Z)
ADDX_IN_AGA1(zero(X), b, one(X)) → U17_AGA(X, binaryZ_in_a(X))
ADDX_IN_AGA1(zero(X), b, one(X)) → BINARYZ_IN_A(X)
ADDX_IN_AGA1(one(X), b, zero(Z)) → U18_AGA(X, Z, succ_in_aa(X, Z))
ADDX_IN_AGA1(one(X), b, zero(Z)) → SUCC_IN_AA(X, Z)
ADDX_IN_AGA1(X, Y, Z) → U19_AGA(X, Y, Z, addC_in_aga(X, Y, Z))
ADDX_IN_AGA1(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA1(one(X), zero(Y), zero(Z)) → U25_AGA(X, Y, Z, addY_in_aaa(X, Y, Z))
ADDC_IN_AGA1(one(X), zero(Y), zero(Z)) → ADDY_IN_AAA1(X, Y, Z)
ADDC_IN_AGA1(one(X), one(Y), one(Z)) → U26_AGA(X, Y, Z, addc_in_aga(X, Y, Z))
ADDC_IN_AGA1(one(X), one(Y), one(Z)) → ADDC_IN_AGA(X, Y, Z)
TIMES_IN_AAG(one(R), S, RSS) → U36_AAG(R, S, RSS, times_in_aaa(R, S, RS))
TIMES_IN_AAG(one(R), S, RSS) → TIMES_IN_AAA(R, S, RS)
U36_AAG(R, S, RSS, times_out_aaa(R, S, RS)) → U37_AAG(R, S, RSS, add_in_agg(S, zero(RS), RSS))
U36_AAG(R, S, RSS, times_out_aaa(R, S, RS)) → ADD_IN_AGG(S, zero(RS), RSS)
ADD_IN_AGG(X, b, X) → U1_AGG(X, binaryZ_in_g(X))
ADD_IN_AGG(X, b, X) → BINARYZ_IN_G(X)
ADD_IN_AGG(b, Y, Y) → U2_AGG(Y, binaryZ_in_g(Y))
ADD_IN_AGG(b, Y, Y) → BINARYZ_IN_G(Y)
ADD_IN_AGG(X, Y, Z) → U3_AGG(X, Y, Z, addz_in_agg(X, Y, Z))
ADD_IN_AGG(X, Y, Z) → ADDZ_IN_AGG(X, Y, Z)
ADDZ_IN_AGG(zero(X), zero(Y), zero(Z)) → U10_AGG(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AGG(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AGG(zero(X), one(Y), one(Z)) → U11_AGG(X, Y, Z, addx_in_agg(X, Y, Z))
ADDZ_IN_AGG(zero(X), one(Y), one(Z)) → ADDX_IN_AGG(X, Y, Z)
ADDX_IN_AGG(one(X), b, one(X)) → U4_AGG(X, binary_in_g(X))
ADDX_IN_AGG(one(X), b, one(X)) → BINARY_IN_G(X)
ADDX_IN_AGG(zero(X), b, zero(X)) → U5_AGG(X, binaryZ_in_a(X))
ADDX_IN_AGG(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AGG(X, Y, Z) → U6_AGG(X, Y, Z, addz_in_agg(X, Y, Z))
ADDX_IN_AGG(X, Y, Z) → ADDZ_IN_AGG(X, Y, Z)
ADDZ_IN_AGG(one(X), zero(Y), one(Z)) → U12_AGG(X, Y, Z, addy_in_aag(X, Y, Z))
ADDZ_IN_AGG(one(X), zero(Y), one(Z)) → ADDY_IN_AAG(X, Y, Z)
ADDY_IN_AAG(b, one(Y), one(Y)) → U7_AAG(Y, binary_in_g(Y))
ADDY_IN_AAG(b, one(Y), one(Y)) → BINARY_IN_G(Y)
ADDY_IN_AAG(b, zero(Y), zero(Y)) → U8_AAG(Y, binaryZ_in_a(Y))
ADDY_IN_AAG(b, zero(Y), zero(Y)) → BINARYZ_IN_A(Y)
ADDY_IN_AAG(X, Y, Z) → U9_AAG(X, Y, Z, addz_in_aag(X, Y, Z))
ADDY_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(zero(X), zero(Y), zero(Z)) → U10_AAG(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AAG(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAG(zero(X), one(Y), one(Z)) → U11_AAG(X, Y, Z, addx_in_aag(X, Y, Z))
ADDZ_IN_AAG(zero(X), one(Y), one(Z)) → ADDX_IN_AAG(X, Y, Z)
ADDX_IN_AAG(one(X), b, one(X)) → U4_AAG(X, binary_in_g(X))
ADDX_IN_AAG(one(X), b, one(X)) → BINARY_IN_G(X)
ADDX_IN_AAG(zero(X), b, zero(X)) → U5_AAG(X, binaryZ_in_a(X))
ADDX_IN_AAG(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AAG(X, Y, Z) → U6_AAG(X, Y, Z, addz_in_aag(X, Y, Z))
ADDX_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(one(X), zero(Y), one(Z)) → U12_AAG(X, Y, Z, addy_in_aag(X, Y, Z))
ADDZ_IN_AAG(one(X), zero(Y), one(Z)) → ADDY_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(one(X), one(Y), zero(Z)) → U13_AAG(X, Y, Z, addc_in_aaa(X, Y, Z))
ADDZ_IN_AAG(one(X), one(Y), zero(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDZ_IN_AGG(one(X), one(Y), zero(Z)) → U13_AGG(X, Y, Z, addc_in_aga(X, Y, Z))
ADDZ_IN_AGG(one(X), one(Y), zero(Z)) → ADDC_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)
U26_AGA(x1, x2, x3, x4)  =  U26_AGA(x2, x4)
U18_AGA(x1, x2, x3)  =  U18_AGA(x3)
U5_AAG(x1, x2)  =  U5_AAG(x2)
U28_A(x1, x2)  =  U28_A(x2)
U9_AAG(x1, x2, x3, x4)  =  U9_AAG(x3, x4)
U3_AGA(x1, x2, x3, x4)  =  U3_AGA(x2, x4)
U24_AGA(x1, x2, x3, x4)  =  U24_AGA(x2, x4)
U13_AAG(x1, x2, x3, x4)  =  U13_AAG(x4)
U22_AAA(x1, x2, x3, x4)  =  U22_AAA(x4)
SUCC_IN_GA(x1, x2)  =  SUCC_IN_GA(x1)
U6_AGA(x1, x2, x3, x4)  =  U6_AGA(x2, x4)
SUCC_IN_AA(x1, x2)  =  SUCC_IN_AA
U30_G(x1, x2)  =  U30_G(x1, x2)
U31_AA(x1, x2)  =  U31_AA(x2)
U20_AAA(x1, x2)  =  U20_AAA(x2)
ADD_IN_AGG(x1, x2, x3)  =  ADD_IN_AGG(x2, x3)
U37_AAA(x1, x2, x3, x4)  =  U37_AAA(x1, x4)
ADDY_IN_AAA(x1, x2, x3)  =  ADDY_IN_AAA
U11_AAG(x1, x2, x3, x4)  =  U11_AAG(x3, x4)
ADDX_IN_AGG(x1, x2, x3)  =  ADDX_IN_AGG(x2, x3)
BINARYZ_IN_G(x1)  =  BINARYZ_IN_G(x1)
U33_GA(x1, x2)  =  U33_GA(x2)
U4_AGG(x1, x2)  =  U4_AGG(x1, x2)
U15_AAA(x1, x2, x3)  =  U15_AAA(x3)
ADDX_IN_AGA1(x1, x2, x3)  =  ADDX_IN_AGA1(x2)
U12_AGA(x1, x2, x3, x4)  =  U12_AGA(x4)
U32_GA(x1, x2, x3)  =  U32_GA(x1, x3)
U21_AAA(x1, x2, x3)  =  U21_AAA(x3)
BINARY_IN_A(x1)  =  BINARY_IN_A
U23_AAA(x1, x2, x3, x4)  =  U23_AAA(x4)
U8_AAA(x1, x2)  =  U8_AAA(x2)
TIMES_IN_AAG(x1, x2, x3)  =  TIMES_IN_AAG(x3)
ADDX_IN_AAG(x1, x2, x3)  =  ADDX_IN_AAG(x3)
U17_AAA(x1, x2)  =  U17_AAA(x2)
U26_AAA(x1, x2, x3, x4)  =  U26_AAA(x4)
U11_AAA(x1, x2, x3, x4)  =  U11_AAA(x4)
TIMES_IN_AAA(x1, x2, x3)  =  TIMES_IN_AAA
SUCCZ_IN_AA(x1, x2)  =  SUCCZ_IN_AA
U27_A(x1, x2)  =  U27_A(x2)
U5_AGG(x1, x2)  =  U5_AGG(x2)
U1_AGG(x1, x2)  =  U1_AGG(x1, x2)
BINARYZ_IN_A(x1)  =  BINARYZ_IN_A
ADDC_IN_AAA(x1, x2, x3)  =  ADDC_IN_AAA
U35_AAA(x1, x2, x3, x4)  =  U35_AAA(x4)
U9_AAA(x1, x2, x3, x4)  =  U9_AAA(x4)
U6_AGG(x1, x2, x3, x4)  =  U6_AGG(x2, x3, x4)
ADDZ_IN_AGG(x1, x2, x3)  =  ADDZ_IN_AGG(x2, x3)
U12_AAG(x1, x2, x3, x4)  =  U12_AAG(x3, x4)
U4_AAA(x1, x2)  =  U4_AAA(x2)
ADD_IN_AGA(x1, x2, x3)  =  ADD_IN_AGA(x2)
U25_AAA(x1, x2, x3, x4)  =  U25_AAA(x4)
ADDC_IN_AGA1(x1, x2, x3)  =  ADDC_IN_AGA1(x2)
U14_AAA(x1, x2, x3)  =  U14_AAA(x3)
U6_AAG(x1, x2, x3, x4)  =  U6_AAG(x3, x4)
ADDY_IN_AAG(x1, x2, x3)  =  ADDY_IN_AAG(x3)
U25_AGA(x1, x2, x3, x4)  =  U25_AGA(x4)
U24_AAA(x1, x2, x3, x4)  =  U24_AAA(x4)
ADDX_IN_AAA(x1, x2, x3)  =  ADDX_IN_AAA
U4_AAG(x1, x2)  =  U4_AAG(x1, x2)
U29_G(x1, x2)  =  U29_G(x2)
U1_AGA(x1, x2)  =  U1_AGA(x2)
U2_AGA(x1, x2)  =  U2_AGA(x1, x2)
ADDC_IN_AGA(x1, x2, x3)  =  ADDC_IN_AGA(x2)
ADDZ_IN_AAG(x1, x2, x3)  =  ADDZ_IN_AAG(x3)
U27_G(x1, x2)  =  U27_G(x2)
U32_AA(x1, x2, x3)  =  U32_AA(x3)
U12_AGG(x1, x2, x3, x4)  =  U12_AGG(x3, x4)
U36_AAG(x1, x2, x3, x4)  =  U36_AAG(x3, x4)
U28_G(x1, x2)  =  U28_G(x1, x2)
U16_AAA(x1, x2, x3, x4)  =  U16_AAA(x4)
U13_AGG(x1, x2, x3, x4)  =  U13_AGG(x2, x4)
U19_AGA(x1, x2, x3, x4)  =  U19_AGA(x2, x4)
U4_AGA(x1, x2)  =  U4_AGA(x2)
U11_AGA(x1, x2, x3, x4)  =  U11_AGA(x2, x4)
U2_AGG(x1, x2)  =  U2_AGG(x1, x2)
ADDY_IN_AAA1(x1, x2, x3)  =  ADDY_IN_AAA1
U16_AGA(x1, x2, x3, x4)  =  U16_AGA(x2, x4)
U15_AGA(x1, x2, x3)  =  U15_AGA(x1, x3)
U5_AAA(x1, x2)  =  U5_AAA(x2)
BINARY_IN_G(x1)  =  BINARY_IN_G(x1)
SUCCZ_IN_GA(x1, x2)  =  SUCCZ_IN_GA(x1)
U10_AGA(x1, x2, x3, x4)  =  U10_AGA(x4)
U3_AGG(x1, x2, x3, x4)  =  U3_AGG(x2, x3, x4)
U13_AAA(x1, x2, x3, x4)  =  U13_AAA(x4)
U13_AGA(x1, x2, x3, x4)  =  U13_AGA(x2, x4)
U7_AAG(x1, x2)  =  U7_AAG(x1, x2)
U7_AAA(x1, x2)  =  U7_AAA(x2)
U12_AAA(x1, x2, x3, x4)  =  U12_AAA(x4)
U34_AA(x1, x2, x3)  =  U34_AA(x3)
U37_AAG(x1, x2, x3, x4)  =  U37_AAG(x1, x3, x4)
U8_AAG(x1, x2)  =  U8_AAG(x2)
U35_AAG(x1, x2, x3, x4)  =  U35_AAG(x4)
U17_AGA(x1, x2)  =  U17_AGA(x2)
ADDZ_IN_AAA(x1, x2, x3)  =  ADDZ_IN_AAA
U10_AAA(x1, x2, x3, x4)  =  U10_AAA(x4)
U23_AGA(x1, x2, x3, x4)  =  U23_AGA(x4)
ADDC_IN_AAA1(x1, x2, x3)  =  ADDC_IN_AAA1
U6_AAA(x1, x2, x3, x4)  =  U6_AAA(x4)
U14_AGA(x1, x2, x3)  =  U14_AGA(x3)
U18_AAA(x1, x2, x3)  =  U18_AAA(x3)
U30_A(x1, x2)  =  U30_A(x2)
U10_AGG(x1, x2, x3, x4)  =  U10_AGG(x4)
U34_GA(x1, x2, x3)  =  U34_GA(x1, x3)
U36_AAA(x1, x2, x3, x4)  =  U36_AAA(x4)
ADDZ_IN_AGA(x1, x2, x3)  =  ADDZ_IN_AGA(x2)
U5_AGA(x1, x2)  =  U5_AGA(x2)
U19_AAA(x1, x2, x3, x4)  =  U19_AAA(x4)
U10_AAG(x1, x2, x3, x4)  =  U10_AAG(x4)
U11_AGG(x1, x2, x3, x4)  =  U11_AGG(x2, x3, x4)
U33_AA(x1, x2)  =  U33_AA(x2)
U31_GA(x1, x2)  =  U31_GA(x2)
ADDX_IN_AAA1(x1, x2, x3)  =  ADDX_IN_AAA1
U29_A(x1, x2)  =  U29_A(x2)
ADDX_IN_AGA(x1, x2, x3)  =  ADDX_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

TIMES_IN_AAG(zero(R), S, zero(RS)) → U35_AAG(R, S, RS, times_in_aaa(R, S, RS))
TIMES_IN_AAG(zero(R), S, zero(RS)) → TIMES_IN_AAA(R, S, RS)
TIMES_IN_AAA(zero(R), S, zero(RS)) → U35_AAA(R, S, RS, times_in_aaa(R, S, RS))
TIMES_IN_AAA(zero(R), S, zero(RS)) → TIMES_IN_AAA(R, S, RS)
TIMES_IN_AAA(one(R), S, RSS) → U36_AAA(R, S, RSS, times_in_aaa(R, S, RS))
TIMES_IN_AAA(one(R), S, RSS) → TIMES_IN_AAA(R, S, RS)
U36_AAA(R, S, RSS, times_out_aaa(R, S, RS)) → U37_AAA(R, S, RSS, add_in_aga(S, zero(RS), RSS))
U36_AAA(R, S, RSS, times_out_aaa(R, S, RS)) → ADD_IN_AGA(S, zero(RS), RSS)
ADD_IN_AGA(X, b, X) → U1_AGA(X, binaryZ_in_a(X))
ADD_IN_AGA(X, b, X) → BINARYZ_IN_A(X)
BINARYZ_IN_A(zero(X)) → U29_A(X, binaryZ_in_a(X))
BINARYZ_IN_A(zero(X)) → BINARYZ_IN_A(X)
BINARYZ_IN_A(one(X)) → U30_A(X, binary_in_a(X))
BINARYZ_IN_A(one(X)) → BINARY_IN_A(X)
BINARY_IN_A(zero(X)) → U27_A(X, binaryZ_in_a(X))
BINARY_IN_A(zero(X)) → BINARYZ_IN_A(X)
BINARY_IN_A(one(X)) → U28_A(X, binary_in_a(X))
BINARY_IN_A(one(X)) → BINARY_IN_A(X)
ADD_IN_AGA(b, Y, Y) → U2_AGA(Y, binaryZ_in_g(Y))
ADD_IN_AGA(b, Y, Y) → BINARYZ_IN_G(Y)
BINARYZ_IN_G(zero(X)) → U29_G(X, binaryZ_in_a(X))
BINARYZ_IN_G(zero(X)) → BINARYZ_IN_A(X)
BINARYZ_IN_G(one(X)) → U30_G(X, binary_in_g(X))
BINARYZ_IN_G(one(X)) → BINARY_IN_G(X)
BINARY_IN_G(zero(X)) → U27_G(X, binaryZ_in_a(X))
BINARY_IN_G(zero(X)) → BINARYZ_IN_A(X)
BINARY_IN_G(one(X)) → U28_G(X, binary_in_g(X))
BINARY_IN_G(one(X)) → BINARY_IN_G(X)
ADD_IN_AGA(X, Y, Z) → U3_AGA(X, Y, Z, addz_in_aga(X, Y, Z))
ADD_IN_AGA(X, Y, Z) → ADDZ_IN_AGA(X, Y, Z)
ADDZ_IN_AGA(zero(X), zero(Y), zero(Z)) → U10_AGA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AGA(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(zero(X), zero(Y), zero(Z)) → U10_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AAA(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(zero(X), one(Y), one(Z)) → U11_AAA(X, Y, Z, addx_in_aaa(X, Y, Z))
ADDZ_IN_AAA(zero(X), one(Y), one(Z)) → ADDX_IN_AAA(X, Y, Z)
ADDX_IN_AAA(one(X), b, one(X)) → U4_AAA(X, binary_in_a(X))
ADDX_IN_AAA(one(X), b, one(X)) → BINARY_IN_A(X)
ADDX_IN_AAA(zero(X), b, zero(X)) → U5_AAA(X, binaryZ_in_a(X))
ADDX_IN_AAA(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AAA(X, Y, Z) → U6_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDX_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(one(X), zero(Y), one(Z)) → U12_AAA(X, Y, Z, addy_in_aaa(X, Y, Z))
ADDZ_IN_AAA(one(X), zero(Y), one(Z)) → ADDY_IN_AAA(X, Y, Z)
ADDY_IN_AAA(b, one(Y), one(Y)) → U7_AAA(Y, binary_in_a(Y))
ADDY_IN_AAA(b, one(Y), one(Y)) → BINARY_IN_A(Y)
ADDY_IN_AAA(b, zero(Y), zero(Y)) → U8_AAA(Y, binaryZ_in_a(Y))
ADDY_IN_AAA(b, zero(Y), zero(Y)) → BINARYZ_IN_A(Y)
ADDY_IN_AAA(X, Y, Z) → U9_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDY_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(one(X), one(Y), zero(Z)) → U13_AAA(X, Y, Z, addc_in_aaa(X, Y, Z))
ADDZ_IN_AAA(one(X), one(Y), zero(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDC_IN_AAA(X, b, Z) → U14_AAA(X, Z, succZ_in_aa(X, Z))
ADDC_IN_AAA(X, b, Z) → SUCCZ_IN_AA(X, Z)
SUCCZ_IN_AA(zero(X), one(X)) → U33_AA(X, binaryZ_in_a(X))
SUCCZ_IN_AA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCCZ_IN_AA(one(X), zero(Z)) → U34_AA(X, Z, succ_in_aa(X, Z))
SUCCZ_IN_AA(one(X), zero(Z)) → SUCC_IN_AA(X, Z)
SUCC_IN_AA(zero(X), one(X)) → U31_AA(X, binaryZ_in_a(X))
SUCC_IN_AA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCC_IN_AA(one(X), zero(Z)) → U32_AA(X, Z, succ_in_aa(X, Z))
SUCC_IN_AA(one(X), zero(Z)) → SUCC_IN_AA(X, Z)
ADDC_IN_AAA(b, Y, Z) → U15_AAA(Y, Z, succZ_in_aa(Y, Z))
ADDC_IN_AAA(b, Y, Z) → SUCCZ_IN_AA(Y, Z)
ADDC_IN_AAA(X, Y, Z) → U16_AAA(X, Y, Z, addC_in_aaa(X, Y, Z))
ADDC_IN_AAA(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(zero(X), zero(Y), one(Z)) → U23_AAA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDC_IN_AAA1(zero(X), zero(Y), one(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AAA1(zero(X), one(Y), zero(Z)) → U24_AAA(X, Y, Z, addX_in_aaa(X, Y, Z))
ADDC_IN_AAA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AAA1(X, Y, Z)
ADDX_IN_AAA1(zero(X), b, one(X)) → U17_AAA(X, binaryZ_in_a(X))
ADDX_IN_AAA1(zero(X), b, one(X)) → BINARYZ_IN_A(X)
ADDX_IN_AAA1(one(X), b, zero(Z)) → U18_AAA(X, Z, succ_in_aa(X, Z))
ADDX_IN_AAA1(one(X), b, zero(Z)) → SUCC_IN_AA(X, Z)
ADDX_IN_AAA1(X, Y, Z) → U19_AAA(X, Y, Z, addC_in_aaa(X, Y, Z))
ADDX_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(one(X), zero(Y), zero(Z)) → U25_AAA(X, Y, Z, addY_in_aaa(X, Y, Z))
ADDC_IN_AAA1(one(X), zero(Y), zero(Z)) → ADDY_IN_AAA1(X, Y, Z)
ADDY_IN_AAA1(b, zero(Y), one(Y)) → U20_AAA(Y, binaryZ_in_a(Y))
ADDY_IN_AAA1(b, zero(Y), one(Y)) → BINARYZ_IN_A(Y)
ADDY_IN_AAA1(b, one(Y), zero(Z)) → U21_AAA(Y, Z, succ_in_aa(Y, Z))
ADDY_IN_AAA1(b, one(Y), zero(Z)) → SUCC_IN_AA(Y, Z)
ADDY_IN_AAA1(X, Y, Z) → U22_AAA(X, Y, Z, addC_in_aaa(X, Y, Z))
ADDY_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(one(X), one(Y), one(Z)) → U26_AAA(X, Y, Z, addc_in_aaa(X, Y, Z))
ADDC_IN_AAA1(one(X), one(Y), one(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDZ_IN_AGA(zero(X), one(Y), one(Z)) → U11_AGA(X, Y, Z, addx_in_aga(X, Y, Z))
ADDZ_IN_AGA(zero(X), one(Y), one(Z)) → ADDX_IN_AGA(X, Y, Z)
ADDX_IN_AGA(one(X), b, one(X)) → U4_AGA(X, binary_in_a(X))
ADDX_IN_AGA(one(X), b, one(X)) → BINARY_IN_A(X)
ADDX_IN_AGA(zero(X), b, zero(X)) → U5_AGA(X, binaryZ_in_a(X))
ADDX_IN_AGA(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AGA(X, Y, Z) → U6_AGA(X, Y, Z, addz_in_aga(X, Y, Z))
ADDX_IN_AGA(X, Y, Z) → ADDZ_IN_AGA(X, Y, Z)
ADDZ_IN_AGA(one(X), zero(Y), one(Z)) → U12_AGA(X, Y, Z, addy_in_aaa(X, Y, Z))
ADDZ_IN_AGA(one(X), zero(Y), one(Z)) → ADDY_IN_AAA(X, Y, Z)
ADDZ_IN_AGA(one(X), one(Y), zero(Z)) → U13_AGA(X, Y, Z, addc_in_aga(X, Y, Z))
ADDZ_IN_AGA(one(X), one(Y), zero(Z)) → ADDC_IN_AGA(X, Y, Z)
ADDC_IN_AGA(X, b, Z) → U14_AGA(X, Z, succZ_in_aa(X, Z))
ADDC_IN_AGA(X, b, Z) → SUCCZ_IN_AA(X, Z)
ADDC_IN_AGA(b, Y, Z) → U15_AGA(Y, Z, succZ_in_ga(Y, Z))
ADDC_IN_AGA(b, Y, Z) → SUCCZ_IN_GA(Y, Z)
SUCCZ_IN_GA(zero(X), one(X)) → U33_GA(X, binaryZ_in_a(X))
SUCCZ_IN_GA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCCZ_IN_GA(one(X), zero(Z)) → U34_GA(X, Z, succ_in_ga(X, Z))
SUCCZ_IN_GA(one(X), zero(Z)) → SUCC_IN_GA(X, Z)
SUCC_IN_GA(zero(X), one(X)) → U31_GA(X, binaryZ_in_a(X))
SUCC_IN_GA(zero(X), one(X)) → BINARYZ_IN_A(X)
SUCC_IN_GA(one(X), zero(Z)) → U32_GA(X, Z, succ_in_ga(X, Z))
SUCC_IN_GA(one(X), zero(Z)) → SUCC_IN_GA(X, Z)
ADDC_IN_AGA(X, Y, Z) → U16_AGA(X, Y, Z, addC_in_aga(X, Y, Z))
ADDC_IN_AGA(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA1(zero(X), zero(Y), one(Z)) → U23_AGA(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDC_IN_AGA1(zero(X), zero(Y), one(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AGA1(zero(X), one(Y), zero(Z)) → U24_AGA(X, Y, Z, addX_in_aga(X, Y, Z))
ADDC_IN_AGA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AGA1(X, Y, Z)
ADDX_IN_AGA1(zero(X), b, one(X)) → U17_AGA(X, binaryZ_in_a(X))
ADDX_IN_AGA1(zero(X), b, one(X)) → BINARYZ_IN_A(X)
ADDX_IN_AGA1(one(X), b, zero(Z)) → U18_AGA(X, Z, succ_in_aa(X, Z))
ADDX_IN_AGA1(one(X), b, zero(Z)) → SUCC_IN_AA(X, Z)
ADDX_IN_AGA1(X, Y, Z) → U19_AGA(X, Y, Z, addC_in_aga(X, Y, Z))
ADDX_IN_AGA1(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA1(one(X), zero(Y), zero(Z)) → U25_AGA(X, Y, Z, addY_in_aaa(X, Y, Z))
ADDC_IN_AGA1(one(X), zero(Y), zero(Z)) → ADDY_IN_AAA1(X, Y, Z)
ADDC_IN_AGA1(one(X), one(Y), one(Z)) → U26_AGA(X, Y, Z, addc_in_aga(X, Y, Z))
ADDC_IN_AGA1(one(X), one(Y), one(Z)) → ADDC_IN_AGA(X, Y, Z)
TIMES_IN_AAG(one(R), S, RSS) → U36_AAG(R, S, RSS, times_in_aaa(R, S, RS))
TIMES_IN_AAG(one(R), S, RSS) → TIMES_IN_AAA(R, S, RS)
U36_AAG(R, S, RSS, times_out_aaa(R, S, RS)) → U37_AAG(R, S, RSS, add_in_agg(S, zero(RS), RSS))
U36_AAG(R, S, RSS, times_out_aaa(R, S, RS)) → ADD_IN_AGG(S, zero(RS), RSS)
ADD_IN_AGG(X, b, X) → U1_AGG(X, binaryZ_in_g(X))
ADD_IN_AGG(X, b, X) → BINARYZ_IN_G(X)
ADD_IN_AGG(b, Y, Y) → U2_AGG(Y, binaryZ_in_g(Y))
ADD_IN_AGG(b, Y, Y) → BINARYZ_IN_G(Y)
ADD_IN_AGG(X, Y, Z) → U3_AGG(X, Y, Z, addz_in_agg(X, Y, Z))
ADD_IN_AGG(X, Y, Z) → ADDZ_IN_AGG(X, Y, Z)
ADDZ_IN_AGG(zero(X), zero(Y), zero(Z)) → U10_AGG(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AGG(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AGG(zero(X), one(Y), one(Z)) → U11_AGG(X, Y, Z, addx_in_agg(X, Y, Z))
ADDZ_IN_AGG(zero(X), one(Y), one(Z)) → ADDX_IN_AGG(X, Y, Z)
ADDX_IN_AGG(one(X), b, one(X)) → U4_AGG(X, binary_in_g(X))
ADDX_IN_AGG(one(X), b, one(X)) → BINARY_IN_G(X)
ADDX_IN_AGG(zero(X), b, zero(X)) → U5_AGG(X, binaryZ_in_a(X))
ADDX_IN_AGG(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AGG(X, Y, Z) → U6_AGG(X, Y, Z, addz_in_agg(X, Y, Z))
ADDX_IN_AGG(X, Y, Z) → ADDZ_IN_AGG(X, Y, Z)
ADDZ_IN_AGG(one(X), zero(Y), one(Z)) → U12_AGG(X, Y, Z, addy_in_aag(X, Y, Z))
ADDZ_IN_AGG(one(X), zero(Y), one(Z)) → ADDY_IN_AAG(X, Y, Z)
ADDY_IN_AAG(b, one(Y), one(Y)) → U7_AAG(Y, binary_in_g(Y))
ADDY_IN_AAG(b, one(Y), one(Y)) → BINARY_IN_G(Y)
ADDY_IN_AAG(b, zero(Y), zero(Y)) → U8_AAG(Y, binaryZ_in_a(Y))
ADDY_IN_AAG(b, zero(Y), zero(Y)) → BINARYZ_IN_A(Y)
ADDY_IN_AAG(X, Y, Z) → U9_AAG(X, Y, Z, addz_in_aag(X, Y, Z))
ADDY_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(zero(X), zero(Y), zero(Z)) → U10_AAG(X, Y, Z, addz_in_aaa(X, Y, Z))
ADDZ_IN_AAG(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDZ_IN_AAG(zero(X), one(Y), one(Z)) → U11_AAG(X, Y, Z, addx_in_aag(X, Y, Z))
ADDZ_IN_AAG(zero(X), one(Y), one(Z)) → ADDX_IN_AAG(X, Y, Z)
ADDX_IN_AAG(one(X), b, one(X)) → U4_AAG(X, binary_in_g(X))
ADDX_IN_AAG(one(X), b, one(X)) → BINARY_IN_G(X)
ADDX_IN_AAG(zero(X), b, zero(X)) → U5_AAG(X, binaryZ_in_a(X))
ADDX_IN_AAG(zero(X), b, zero(X)) → BINARYZ_IN_A(X)
ADDX_IN_AAG(X, Y, Z) → U6_AAG(X, Y, Z, addz_in_aag(X, Y, Z))
ADDX_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(one(X), zero(Y), one(Z)) → U12_AAG(X, Y, Z, addy_in_aag(X, Y, Z))
ADDZ_IN_AAG(one(X), zero(Y), one(Z)) → ADDY_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(one(X), one(Y), zero(Z)) → U13_AAG(X, Y, Z, addc_in_aaa(X, Y, Z))
ADDZ_IN_AAG(one(X), one(Y), zero(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDZ_IN_AGG(one(X), one(Y), zero(Z)) → U13_AGG(X, Y, Z, addc_in_aga(X, Y, Z))
ADDZ_IN_AGG(one(X), one(Y), zero(Z)) → ADDC_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)
U26_AGA(x1, x2, x3, x4)  =  U26_AGA(x2, x4)
U18_AGA(x1, x2, x3)  =  U18_AGA(x3)
U5_AAG(x1, x2)  =  U5_AAG(x2)
U28_A(x1, x2)  =  U28_A(x2)
U9_AAG(x1, x2, x3, x4)  =  U9_AAG(x3, x4)
U3_AGA(x1, x2, x3, x4)  =  U3_AGA(x2, x4)
U24_AGA(x1, x2, x3, x4)  =  U24_AGA(x2, x4)
U13_AAG(x1, x2, x3, x4)  =  U13_AAG(x4)
U22_AAA(x1, x2, x3, x4)  =  U22_AAA(x4)
SUCC_IN_GA(x1, x2)  =  SUCC_IN_GA(x1)
U6_AGA(x1, x2, x3, x4)  =  U6_AGA(x2, x4)
SUCC_IN_AA(x1, x2)  =  SUCC_IN_AA
U30_G(x1, x2)  =  U30_G(x1, x2)
U31_AA(x1, x2)  =  U31_AA(x2)
U20_AAA(x1, x2)  =  U20_AAA(x2)
ADD_IN_AGG(x1, x2, x3)  =  ADD_IN_AGG(x2, x3)
U37_AAA(x1, x2, x3, x4)  =  U37_AAA(x1, x4)
ADDY_IN_AAA(x1, x2, x3)  =  ADDY_IN_AAA
U11_AAG(x1, x2, x3, x4)  =  U11_AAG(x3, x4)
ADDX_IN_AGG(x1, x2, x3)  =  ADDX_IN_AGG(x2, x3)
BINARYZ_IN_G(x1)  =  BINARYZ_IN_G(x1)
U33_GA(x1, x2)  =  U33_GA(x2)
U4_AGG(x1, x2)  =  U4_AGG(x1, x2)
U15_AAA(x1, x2, x3)  =  U15_AAA(x3)
ADDX_IN_AGA1(x1, x2, x3)  =  ADDX_IN_AGA1(x2)
U12_AGA(x1, x2, x3, x4)  =  U12_AGA(x4)
U32_GA(x1, x2, x3)  =  U32_GA(x1, x3)
U21_AAA(x1, x2, x3)  =  U21_AAA(x3)
BINARY_IN_A(x1)  =  BINARY_IN_A
U23_AAA(x1, x2, x3, x4)  =  U23_AAA(x4)
U8_AAA(x1, x2)  =  U8_AAA(x2)
TIMES_IN_AAG(x1, x2, x3)  =  TIMES_IN_AAG(x3)
ADDX_IN_AAG(x1, x2, x3)  =  ADDX_IN_AAG(x3)
U17_AAA(x1, x2)  =  U17_AAA(x2)
U26_AAA(x1, x2, x3, x4)  =  U26_AAA(x4)
U11_AAA(x1, x2, x3, x4)  =  U11_AAA(x4)
TIMES_IN_AAA(x1, x2, x3)  =  TIMES_IN_AAA
SUCCZ_IN_AA(x1, x2)  =  SUCCZ_IN_AA
U27_A(x1, x2)  =  U27_A(x2)
U5_AGG(x1, x2)  =  U5_AGG(x2)
U1_AGG(x1, x2)  =  U1_AGG(x1, x2)
BINARYZ_IN_A(x1)  =  BINARYZ_IN_A
ADDC_IN_AAA(x1, x2, x3)  =  ADDC_IN_AAA
U35_AAA(x1, x2, x3, x4)  =  U35_AAA(x4)
U9_AAA(x1, x2, x3, x4)  =  U9_AAA(x4)
U6_AGG(x1, x2, x3, x4)  =  U6_AGG(x2, x3, x4)
ADDZ_IN_AGG(x1, x2, x3)  =  ADDZ_IN_AGG(x2, x3)
U12_AAG(x1, x2, x3, x4)  =  U12_AAG(x3, x4)
U4_AAA(x1, x2)  =  U4_AAA(x2)
ADD_IN_AGA(x1, x2, x3)  =  ADD_IN_AGA(x2)
U25_AAA(x1, x2, x3, x4)  =  U25_AAA(x4)
ADDC_IN_AGA1(x1, x2, x3)  =  ADDC_IN_AGA1(x2)
U14_AAA(x1, x2, x3)  =  U14_AAA(x3)
U6_AAG(x1, x2, x3, x4)  =  U6_AAG(x3, x4)
ADDY_IN_AAG(x1, x2, x3)  =  ADDY_IN_AAG(x3)
U25_AGA(x1, x2, x3, x4)  =  U25_AGA(x4)
U24_AAA(x1, x2, x3, x4)  =  U24_AAA(x4)
ADDX_IN_AAA(x1, x2, x3)  =  ADDX_IN_AAA
U4_AAG(x1, x2)  =  U4_AAG(x1, x2)
U29_G(x1, x2)  =  U29_G(x2)
U1_AGA(x1, x2)  =  U1_AGA(x2)
U2_AGA(x1, x2)  =  U2_AGA(x1, x2)
ADDC_IN_AGA(x1, x2, x3)  =  ADDC_IN_AGA(x2)
ADDZ_IN_AAG(x1, x2, x3)  =  ADDZ_IN_AAG(x3)
U27_G(x1, x2)  =  U27_G(x2)
U32_AA(x1, x2, x3)  =  U32_AA(x3)
U12_AGG(x1, x2, x3, x4)  =  U12_AGG(x3, x4)
U36_AAG(x1, x2, x3, x4)  =  U36_AAG(x3, x4)
U28_G(x1, x2)  =  U28_G(x1, x2)
U16_AAA(x1, x2, x3, x4)  =  U16_AAA(x4)
U13_AGG(x1, x2, x3, x4)  =  U13_AGG(x2, x4)
U19_AGA(x1, x2, x3, x4)  =  U19_AGA(x2, x4)
U4_AGA(x1, x2)  =  U4_AGA(x2)
U11_AGA(x1, x2, x3, x4)  =  U11_AGA(x2, x4)
U2_AGG(x1, x2)  =  U2_AGG(x1, x2)
ADDY_IN_AAA1(x1, x2, x3)  =  ADDY_IN_AAA1
U16_AGA(x1, x2, x3, x4)  =  U16_AGA(x2, x4)
U15_AGA(x1, x2, x3)  =  U15_AGA(x1, x3)
U5_AAA(x1, x2)  =  U5_AAA(x2)
BINARY_IN_G(x1)  =  BINARY_IN_G(x1)
SUCCZ_IN_GA(x1, x2)  =  SUCCZ_IN_GA(x1)
U10_AGA(x1, x2, x3, x4)  =  U10_AGA(x4)
U3_AGG(x1, x2, x3, x4)  =  U3_AGG(x2, x3, x4)
U13_AAA(x1, x2, x3, x4)  =  U13_AAA(x4)
U13_AGA(x1, x2, x3, x4)  =  U13_AGA(x2, x4)
U7_AAG(x1, x2)  =  U7_AAG(x1, x2)
U7_AAA(x1, x2)  =  U7_AAA(x2)
U12_AAA(x1, x2, x3, x4)  =  U12_AAA(x4)
U34_AA(x1, x2, x3)  =  U34_AA(x3)
U37_AAG(x1, x2, x3, x4)  =  U37_AAG(x1, x3, x4)
U8_AAG(x1, x2)  =  U8_AAG(x2)
U35_AAG(x1, x2, x3, x4)  =  U35_AAG(x4)
U17_AGA(x1, x2)  =  U17_AGA(x2)
ADDZ_IN_AAA(x1, x2, x3)  =  ADDZ_IN_AAA
U10_AAA(x1, x2, x3, x4)  =  U10_AAA(x4)
U23_AGA(x1, x2, x3, x4)  =  U23_AGA(x4)
ADDC_IN_AAA1(x1, x2, x3)  =  ADDC_IN_AAA1
U6_AAA(x1, x2, x3, x4)  =  U6_AAA(x4)
U14_AGA(x1, x2, x3)  =  U14_AGA(x3)
U18_AAA(x1, x2, x3)  =  U18_AAA(x3)
U30_A(x1, x2)  =  U30_A(x2)
U10_AGG(x1, x2, x3, x4)  =  U10_AGG(x4)
U34_GA(x1, x2, x3)  =  U34_GA(x1, x3)
U36_AAA(x1, x2, x3, x4)  =  U36_AAA(x4)
ADDZ_IN_AGA(x1, x2, x3)  =  ADDZ_IN_AGA(x2)
U5_AGA(x1, x2)  =  U5_AGA(x2)
U19_AAA(x1, x2, x3, x4)  =  U19_AAA(x4)
U10_AAG(x1, x2, x3, x4)  =  U10_AAG(x4)
U11_AGG(x1, x2, x3, x4)  =  U11_AGG(x2, x3, x4)
U33_AA(x1, x2)  =  U33_AA(x2)
U31_GA(x1, x2)  =  U31_GA(x2)
ADDX_IN_AAA1(x1, x2, x3)  =  ADDX_IN_AAA1
U29_A(x1, x2)  =  U29_A(x2)
ADDX_IN_AGA(x1, x2, x3)  =  ADDX_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 10 SCCs with 136 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

BINARY_IN_A(one(X)) → BINARY_IN_A(X)
BINARYZ_IN_A(one(X)) → BINARY_IN_A(X)
BINARY_IN_A(zero(X)) → BINARYZ_IN_A(X)
BINARYZ_IN_A(zero(X)) → BINARYZ_IN_A(X)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)
BINARY_IN_A(x1)  =  BINARY_IN_A
BINARYZ_IN_A(x1)  =  BINARYZ_IN_A

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

BINARY_IN_A(one(X)) → BINARY_IN_A(X)
BINARYZ_IN_A(one(X)) → BINARY_IN_A(X)
BINARY_IN_A(zero(X)) → BINARYZ_IN_A(X)
BINARYZ_IN_A(zero(X)) → BINARYZ_IN_A(X)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
BINARY_IN_A(x1)  =  BINARY_IN_A
BINARYZ_IN_A(x1)  =  BINARYZ_IN_A

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

BINARYZ_IN_ABINARYZ_IN_A
BINARY_IN_ABINARY_IN_A
BINARY_IN_ABINARYZ_IN_A
BINARYZ_IN_ABINARY_IN_A

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

BINARYZ_IN_ABINARYZ_IN_A
BINARY_IN_ABINARY_IN_A
BINARY_IN_ABINARYZ_IN_A
BINARYZ_IN_ABINARY_IN_A

The TRS R consists of the following rules:none


s = BINARYZ_IN_A evaluates to t =BINARYZ_IN_A

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from BINARYZ_IN_A to BINARYZ_IN_A.





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

SUCC_IN_GA(one(X), zero(Z)) → SUCC_IN_GA(X, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)
SUCC_IN_GA(x1, x2)  =  SUCC_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

SUCC_IN_GA(one(X), zero(Z)) → SUCC_IN_GA(X, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
SUCC_IN_GA(x1, x2)  =  SUCC_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

SUCC_IN_GA(one(X)) → SUCC_IN_GA(X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

SUCC_IN_AA(one(X), zero(Z)) → SUCC_IN_AA(X, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)
SUCC_IN_AA(x1, x2)  =  SUCC_IN_AA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

SUCC_IN_AA(one(X), zero(Z)) → SUCC_IN_AA(X, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
SUCC_IN_AA(x1, x2)  =  SUCC_IN_AA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

SUCC_IN_AASUCC_IN_AA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

SUCC_IN_AASUCC_IN_AA

The TRS R consists of the following rules:none


s = SUCC_IN_AA evaluates to t =SUCC_IN_AA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from SUCC_IN_AA to SUCC_IN_AA.





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADDZ_IN_AAA(one(X), zero(Y), one(Z)) → ADDY_IN_AAA(X, Y, Z)
ADDY_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDY_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDX_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(one(X), one(Y), one(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDC_IN_AAA1(one(X), zero(Y), zero(Z)) → ADDY_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AAA1(X, Y, Z)
ADDZ_IN_AAA(one(X), one(Y), zero(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDX_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AAA1(zero(X), zero(Y), one(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AAA(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDZ_IN_AAA(zero(X), one(Y), one(Z)) → ADDX_IN_AAA(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)
ADDY_IN_AAA(x1, x2, x3)  =  ADDY_IN_AAA
ADDC_IN_AAA(x1, x2, x3)  =  ADDC_IN_AAA
ADDX_IN_AAA(x1, x2, x3)  =  ADDX_IN_AAA
ADDY_IN_AAA1(x1, x2, x3)  =  ADDY_IN_AAA1
ADDZ_IN_AAA(x1, x2, x3)  =  ADDZ_IN_AAA
ADDC_IN_AAA1(x1, x2, x3)  =  ADDC_IN_AAA1
ADDX_IN_AAA1(x1, x2, x3)  =  ADDX_IN_AAA1

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADDZ_IN_AAA(one(X), zero(Y), one(Z)) → ADDY_IN_AAA(X, Y, Z)
ADDY_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDY_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDX_IN_AAA1(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(one(X), one(Y), one(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDC_IN_AAA1(one(X), zero(Y), zero(Z)) → ADDY_IN_AAA1(X, Y, Z)
ADDC_IN_AAA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AAA1(X, Y, Z)
ADDZ_IN_AAA(one(X), one(Y), zero(Z)) → ADDC_IN_AAA(X, Y, Z)
ADDZ_IN_AAA(zero(X), zero(Y), zero(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDX_IN_AAA(X, Y, Z) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AAA1(zero(X), zero(Y), one(Z)) → ADDZ_IN_AAA(X, Y, Z)
ADDC_IN_AAA(X, Y, Z) → ADDC_IN_AAA1(X, Y, Z)
ADDZ_IN_AAA(zero(X), one(Y), one(Z)) → ADDX_IN_AAA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
ADDY_IN_AAA(x1, x2, x3)  =  ADDY_IN_AAA
ADDC_IN_AAA(x1, x2, x3)  =  ADDC_IN_AAA
ADDX_IN_AAA(x1, x2, x3)  =  ADDX_IN_AAA
ADDY_IN_AAA1(x1, x2, x3)  =  ADDY_IN_AAA1
ADDZ_IN_AAA(x1, x2, x3)  =  ADDZ_IN_AAA
ADDC_IN_AAA1(x1, x2, x3)  =  ADDC_IN_AAA1
ADDX_IN_AAA1(x1, x2, x3)  =  ADDX_IN_AAA1

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

ADDC_IN_AAA1ADDC_IN_AAA
ADDC_IN_AAA1ADDX_IN_AAA1
ADDC_IN_AAAADDC_IN_AAA1
ADDC_IN_AAA1ADDZ_IN_AAA
ADDZ_IN_AAAADDX_IN_AAA
ADDY_IN_AAAADDZ_IN_AAA
ADDX_IN_AAAADDZ_IN_AAA
ADDZ_IN_AAAADDY_IN_AAA
ADDY_IN_AAA1ADDC_IN_AAA1
ADDZ_IN_AAAADDC_IN_AAA
ADDC_IN_AAA1ADDY_IN_AAA1
ADDZ_IN_AAAADDZ_IN_AAA
ADDX_IN_AAA1ADDC_IN_AAA1

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

ADDC_IN_AAA1ADDC_IN_AAA
ADDC_IN_AAA1ADDX_IN_AAA1
ADDC_IN_AAAADDC_IN_AAA1
ADDC_IN_AAA1ADDZ_IN_AAA
ADDZ_IN_AAAADDX_IN_AAA
ADDY_IN_AAAADDZ_IN_AAA
ADDX_IN_AAAADDZ_IN_AAA
ADDZ_IN_AAAADDY_IN_AAA
ADDY_IN_AAA1ADDC_IN_AAA1
ADDZ_IN_AAAADDC_IN_AAA
ADDC_IN_AAA1ADDY_IN_AAA1
ADDZ_IN_AAAADDZ_IN_AAA
ADDX_IN_AAA1ADDC_IN_AAA1

The TRS R consists of the following rules:none


s = ADDZ_IN_AAA evaluates to t =ADDZ_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from ADDZ_IN_AAA to ADDZ_IN_AAA.





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGA1(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA1(one(X), one(Y), one(Z)) → ADDC_IN_AGA(X, Y, Z)
ADDC_IN_AGA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AGA1(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)
ADDX_IN_AGA1(x1, x2, x3)  =  ADDX_IN_AGA1(x2)
ADDC_IN_AGA1(x1, x2, x3)  =  ADDC_IN_AGA1(x2)
ADDC_IN_AGA(x1, x2, x3)  =  ADDC_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGA1(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA(X, Y, Z) → ADDC_IN_AGA1(X, Y, Z)
ADDC_IN_AGA1(one(X), one(Y), one(Z)) → ADDC_IN_AGA(X, Y, Z)
ADDC_IN_AGA1(zero(X), one(Y), zero(Z)) → ADDX_IN_AGA1(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
ADDX_IN_AGA1(x1, x2, x3)  =  ADDX_IN_AGA1(x2)
ADDC_IN_AGA1(x1, x2, x3)  =  ADDC_IN_AGA1(x2)
ADDC_IN_AGA(x1, x2, x3)  =  ADDC_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

ADDC_IN_AGA(Y) → ADDC_IN_AGA1(Y)
ADDX_IN_AGA1(Y) → ADDC_IN_AGA1(Y)
ADDC_IN_AGA1(one(Y)) → ADDX_IN_AGA1(Y)
ADDC_IN_AGA1(one(Y)) → ADDC_IN_AGA(Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGA(X, Y, Z) → ADDZ_IN_AGA(X, Y, Z)
ADDZ_IN_AGA(zero(X), one(Y), one(Z)) → ADDX_IN_AGA(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)
ADDZ_IN_AGA(x1, x2, x3)  =  ADDZ_IN_AGA(x2)
ADDX_IN_AGA(x1, x2, x3)  =  ADDX_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGA(X, Y, Z) → ADDZ_IN_AGA(X, Y, Z)
ADDZ_IN_AGA(zero(X), one(Y), one(Z)) → ADDX_IN_AGA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
ADDZ_IN_AGA(x1, x2, x3)  =  ADDZ_IN_AGA(x2)
ADDX_IN_AGA(x1, x2, x3)  =  ADDX_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGA(Y) → ADDZ_IN_AGA(Y)
ADDZ_IN_AGA(one(Y)) → ADDX_IN_AGA(Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

BINARY_IN_G(one(X)) → BINARY_IN_G(X)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)
BINARY_IN_G(x1)  =  BINARY_IN_G(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

BINARY_IN_G(one(X)) → BINARY_IN_G(X)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

BINARY_IN_G(one(X)) → BINARY_IN_G(X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADDZ_IN_AAG(zero(X), one(Y), one(Z)) → ADDX_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(one(X), zero(Y), one(Z)) → ADDY_IN_AAG(X, Y, Z)
ADDX_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)
ADDY_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)
ADDX_IN_AAG(x1, x2, x3)  =  ADDX_IN_AAG(x3)
ADDY_IN_AAG(x1, x2, x3)  =  ADDY_IN_AAG(x3)
ADDZ_IN_AAG(x1, x2, x3)  =  ADDZ_IN_AAG(x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADDZ_IN_AAG(zero(X), one(Y), one(Z)) → ADDX_IN_AAG(X, Y, Z)
ADDZ_IN_AAG(one(X), zero(Y), one(Z)) → ADDY_IN_AAG(X, Y, Z)
ADDX_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)
ADDY_IN_AAG(X, Y, Z) → ADDZ_IN_AAG(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
ADDX_IN_AAG(x1, x2, x3)  =  ADDX_IN_AAG(x3)
ADDY_IN_AAG(x1, x2, x3)  =  ADDY_IN_AAG(x3)
ADDZ_IN_AAG(x1, x2, x3)  =  ADDZ_IN_AAG(x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

ADDY_IN_AAG(Z) → ADDZ_IN_AAG(Z)
ADDZ_IN_AAG(one(Z)) → ADDX_IN_AAG(Z)
ADDX_IN_AAG(Z) → ADDZ_IN_AAG(Z)
ADDZ_IN_AAG(one(Z)) → ADDY_IN_AAG(Z)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGG(X, Y, Z) → ADDZ_IN_AGG(X, Y, Z)
ADDZ_IN_AGG(zero(X), one(Y), one(Z)) → ADDX_IN_AGG(X, Y, Z)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)
ADDX_IN_AGG(x1, x2, x3)  =  ADDX_IN_AGG(x2, x3)
ADDZ_IN_AGG(x1, x2, x3)  =  ADDZ_IN_AGG(x2, x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGG(X, Y, Z) → ADDZ_IN_AGG(X, Y, Z)
ADDZ_IN_AGG(zero(X), one(Y), one(Z)) → ADDX_IN_AGG(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
ADDX_IN_AGG(x1, x2, x3)  =  ADDX_IN_AGG(x2, x3)
ADDZ_IN_AGG(x1, x2, x3)  =  ADDZ_IN_AGG(x2, x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

ADDX_IN_AGG(Y, Z) → ADDZ_IN_AGG(Y, Z)
ADDZ_IN_AGG(one(Y), one(Z)) → ADDX_IN_AGG(Y, Z)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

TIMES_IN_AAA(one(R), S, RSS) → TIMES_IN_AAA(R, S, RS)
TIMES_IN_AAA(zero(R), S, zero(RS)) → TIMES_IN_AAA(R, S, RS)

The TRS R consists of the following rules:

times_in_aag(one(b), X, X) → times_out_aag(one(b), X, X)
times_in_aag(zero(R), S, zero(RS)) → U35_aag(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(b), X, X) → times_out_aaa(one(b), X, X)
times_in_aaa(zero(R), S, zero(RS)) → U35_aaa(R, S, RS, times_in_aaa(R, S, RS))
times_in_aaa(one(R), S, RSS) → U36_aaa(R, S, RSS, times_in_aaa(R, S, RS))
U36_aaa(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aaa(R, S, RSS, add_in_aga(S, zero(RS), RSS))
add_in_aga(b, b, b) → add_out_aga(b, b, b)
add_in_aga(X, b, X) → U1_aga(X, binaryZ_in_a(X))
binaryZ_in_a(zero(X)) → U29_a(X, binaryZ_in_a(X))
binaryZ_in_a(one(X)) → U30_a(X, binary_in_a(X))
binary_in_a(b) → binary_out_a(b)
binary_in_a(zero(X)) → U27_a(X, binaryZ_in_a(X))
U27_a(X, binaryZ_out_a(X)) → binary_out_a(zero(X))
binary_in_a(one(X)) → U28_a(X, binary_in_a(X))
U28_a(X, binary_out_a(X)) → binary_out_a(one(X))
U30_a(X, binary_out_a(X)) → binaryZ_out_a(one(X))
U29_a(X, binaryZ_out_a(X)) → binaryZ_out_a(zero(X))
U1_aga(X, binaryZ_out_a(X)) → add_out_aga(X, b, X)
add_in_aga(b, Y, Y) → U2_aga(Y, binaryZ_in_g(Y))
binaryZ_in_g(zero(X)) → U29_g(X, binaryZ_in_a(X))
U29_g(X, binaryZ_out_a(X)) → binaryZ_out_g(zero(X))
binaryZ_in_g(one(X)) → U30_g(X, binary_in_g(X))
binary_in_g(b) → binary_out_g(b)
binary_in_g(zero(X)) → U27_g(X, binaryZ_in_a(X))
U27_g(X, binaryZ_out_a(X)) → binary_out_g(zero(X))
binary_in_g(one(X)) → U28_g(X, binary_in_g(X))
U28_g(X, binary_out_g(X)) → binary_out_g(one(X))
U30_g(X, binary_out_g(X)) → binaryZ_out_g(one(X))
U2_aga(Y, binaryZ_out_g(Y)) → add_out_aga(b, Y, Y)
add_in_aga(X, Y, Z) → U3_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(zero(X), zero(Y), zero(Z)) → U10_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), zero(Y), zero(Z)) → U10_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(zero(X), one(Y), one(Z)) → U11_aaa(X, Y, Z, addx_in_aaa(X, Y, Z))
addx_in_aaa(one(X), b, one(X)) → U4_aaa(X, binary_in_a(X))
U4_aaa(X, binary_out_a(X)) → addx_out_aaa(one(X), b, one(X))
addx_in_aaa(zero(X), b, zero(X)) → U5_aaa(X, binaryZ_in_a(X))
U5_aaa(X, binaryZ_out_a(X)) → addx_out_aaa(zero(X), b, zero(X))
addx_in_aaa(X, Y, Z) → U6_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), zero(Y), one(Z)) → U12_aaa(X, Y, Z, addy_in_aaa(X, Y, Z))
addy_in_aaa(b, one(Y), one(Y)) → U7_aaa(Y, binary_in_a(Y))
U7_aaa(Y, binary_out_a(Y)) → addy_out_aaa(b, one(Y), one(Y))
addy_in_aaa(b, zero(Y), zero(Y)) → U8_aaa(Y, binaryZ_in_a(Y))
U8_aaa(Y, binaryZ_out_a(Y)) → addy_out_aaa(b, zero(Y), zero(Y))
addy_in_aaa(X, Y, Z) → U9_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
addz_in_aaa(one(X), one(Y), zero(Z)) → U13_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
addc_in_aaa(b, b, one(b)) → addc_out_aaa(b, b, one(b))
addc_in_aaa(X, b, Z) → U14_aaa(X, Z, succZ_in_aa(X, Z))
succZ_in_aa(zero(X), one(X)) → U33_aa(X, binaryZ_in_a(X))
U33_aa(X, binaryZ_out_a(X)) → succZ_out_aa(zero(X), one(X))
succZ_in_aa(one(X), zero(Z)) → U34_aa(X, Z, succ_in_aa(X, Z))
succ_in_aa(b, one(b)) → succ_out_aa(b, one(b))
succ_in_aa(zero(X), one(X)) → U31_aa(X, binaryZ_in_a(X))
U31_aa(X, binaryZ_out_a(X)) → succ_out_aa(zero(X), one(X))
succ_in_aa(one(X), zero(Z)) → U32_aa(X, Z, succ_in_aa(X, Z))
U32_aa(X, Z, succ_out_aa(X, Z)) → succ_out_aa(one(X), zero(Z))
U34_aa(X, Z, succ_out_aa(X, Z)) → succZ_out_aa(one(X), zero(Z))
U14_aaa(X, Z, succZ_out_aa(X, Z)) → addc_out_aaa(X, b, Z)
addc_in_aaa(b, Y, Z) → U15_aaa(Y, Z, succZ_in_aa(Y, Z))
U15_aaa(Y, Z, succZ_out_aa(Y, Z)) → addc_out_aaa(b, Y, Z)
addc_in_aaa(X, Y, Z) → U16_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(zero(X), zero(Y), one(Z)) → U23_aaa(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), zero(Y), one(Z))
addC_in_aaa(zero(X), one(Y), zero(Z)) → U24_aaa(X, Y, Z, addX_in_aaa(X, Y, Z))
addX_in_aaa(zero(X), b, one(X)) → U17_aaa(X, binaryZ_in_a(X))
U17_aaa(X, binaryZ_out_a(X)) → addX_out_aaa(zero(X), b, one(X))
addX_in_aaa(one(X), b, zero(Z)) → U18_aaa(X, Z, succ_in_aa(X, Z))
U18_aaa(X, Z, succ_out_aa(X, Z)) → addX_out_aaa(one(X), b, zero(Z))
addX_in_aaa(X, Y, Z) → U19_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), zero(Y), zero(Z)) → U25_aaa(X, Y, Z, addY_in_aaa(X, Y, Z))
addY_in_aaa(b, zero(Y), one(Y)) → U20_aaa(Y, binaryZ_in_a(Y))
U20_aaa(Y, binaryZ_out_a(Y)) → addY_out_aaa(b, zero(Y), one(Y))
addY_in_aaa(b, one(Y), zero(Z)) → U21_aaa(Y, Z, succ_in_aa(Y, Z))
U21_aaa(Y, Z, succ_out_aa(Y, Z)) → addY_out_aaa(b, one(Y), zero(Z))
addY_in_aaa(X, Y, Z) → U22_aaa(X, Y, Z, addC_in_aaa(X, Y, Z))
addC_in_aaa(one(X), one(Y), one(Z)) → U26_aaa(X, Y, Z, addc_in_aaa(X, Y, Z))
U26_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), one(Y), one(Z))
U22_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addY_out_aaa(X, Y, Z)
U25_aaa(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aaa(one(X), zero(Y), zero(Z))
U19_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addX_out_aaa(X, Y, Z)
U24_aaa(X, Y, Z, addX_out_aaa(X, Y, Z)) → addC_out_aaa(zero(X), one(Y), zero(Z))
U16_aaa(X, Y, Z, addC_out_aaa(X, Y, Z)) → addc_out_aaa(X, Y, Z)
U13_aaa(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), one(Y), zero(Z))
U9_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addy_out_aaa(X, Y, Z)
U12_aaa(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aaa(one(X), zero(Y), one(Z))
U6_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addx_out_aaa(X, Y, Z)
U11_aaa(X, Y, Z, addx_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), one(Y), one(Z))
U10_aaa(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aaa(zero(X), zero(Y), zero(Z))
U10_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aga(zero(X), zero(Y), zero(Z))
addz_in_aga(zero(X), one(Y), one(Z)) → U11_aga(X, Y, Z, addx_in_aga(X, Y, Z))
addx_in_aga(one(X), b, one(X)) → U4_aga(X, binary_in_a(X))
U4_aga(X, binary_out_a(X)) → addx_out_aga(one(X), b, one(X))
addx_in_aga(zero(X), b, zero(X)) → U5_aga(X, binaryZ_in_a(X))
U5_aga(X, binaryZ_out_a(X)) → addx_out_aga(zero(X), b, zero(X))
addx_in_aga(X, Y, Z) → U6_aga(X, Y, Z, addz_in_aga(X, Y, Z))
addz_in_aga(one(X), zero(Y), one(Z)) → U12_aga(X, Y, Z, addy_in_aaa(X, Y, Z))
U12_aga(X, Y, Z, addy_out_aaa(X, Y, Z)) → addz_out_aga(one(X), zero(Y), one(Z))
addz_in_aga(one(X), one(Y), zero(Z)) → U13_aga(X, Y, Z, addc_in_aga(X, Y, Z))
addc_in_aga(b, b, one(b)) → addc_out_aga(b, b, one(b))
addc_in_aga(X, b, Z) → U14_aga(X, Z, succZ_in_aa(X, Z))
U14_aga(X, Z, succZ_out_aa(X, Z)) → addc_out_aga(X, b, Z)
addc_in_aga(b, Y, Z) → U15_aga(Y, Z, succZ_in_ga(Y, Z))
succZ_in_ga(zero(X), one(X)) → U33_ga(X, binaryZ_in_a(X))
U33_ga(X, binaryZ_out_a(X)) → succZ_out_ga(zero(X), one(X))
succZ_in_ga(one(X), zero(Z)) → U34_ga(X, Z, succ_in_ga(X, Z))
succ_in_ga(b, one(b)) → succ_out_ga(b, one(b))
succ_in_ga(zero(X), one(X)) → U31_ga(X, binaryZ_in_a(X))
U31_ga(X, binaryZ_out_a(X)) → succ_out_ga(zero(X), one(X))
succ_in_ga(one(X), zero(Z)) → U32_ga(X, Z, succ_in_ga(X, Z))
U32_ga(X, Z, succ_out_ga(X, Z)) → succ_out_ga(one(X), zero(Z))
U34_ga(X, Z, succ_out_ga(X, Z)) → succZ_out_ga(one(X), zero(Z))
U15_aga(Y, Z, succZ_out_ga(Y, Z)) → addc_out_aga(b, Y, Z)
addc_in_aga(X, Y, Z) → U16_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(zero(X), zero(Y), one(Z)) → U23_aga(X, Y, Z, addz_in_aaa(X, Y, Z))
U23_aga(X, Y, Z, addz_out_aaa(X, Y, Z)) → addC_out_aga(zero(X), zero(Y), one(Z))
addC_in_aga(zero(X), one(Y), zero(Z)) → U24_aga(X, Y, Z, addX_in_aga(X, Y, Z))
addX_in_aga(zero(X), b, one(X)) → U17_aga(X, binaryZ_in_a(X))
U17_aga(X, binaryZ_out_a(X)) → addX_out_aga(zero(X), b, one(X))
addX_in_aga(one(X), b, zero(Z)) → U18_aga(X, Z, succ_in_aa(X, Z))
U18_aga(X, Z, succ_out_aa(X, Z)) → addX_out_aga(one(X), b, zero(Z))
addX_in_aga(X, Y, Z) → U19_aga(X, Y, Z, addC_in_aga(X, Y, Z))
addC_in_aga(one(X), zero(Y), zero(Z)) → U25_aga(X, Y, Z, addY_in_aaa(X, Y, Z))
U25_aga(X, Y, Z, addY_out_aaa(X, Y, Z)) → addC_out_aga(one(X), zero(Y), zero(Z))
addC_in_aga(one(X), one(Y), one(Z)) → U26_aga(X, Y, Z, addc_in_aga(X, Y, Z))
U26_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addC_out_aga(one(X), one(Y), one(Z))
U19_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addX_out_aga(X, Y, Z)
U24_aga(X, Y, Z, addX_out_aga(X, Y, Z)) → addC_out_aga(zero(X), one(Y), zero(Z))
U16_aga(X, Y, Z, addC_out_aga(X, Y, Z)) → addc_out_aga(X, Y, Z)
U13_aga(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_aga(one(X), one(Y), zero(Z))
U6_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → addx_out_aga(X, Y, Z)
U11_aga(X, Y, Z, addx_out_aga(X, Y, Z)) → addz_out_aga(zero(X), one(Y), one(Z))
U3_aga(X, Y, Z, addz_out_aga(X, Y, Z)) → add_out_aga(X, Y, Z)
U37_aaa(R, S, RSS, add_out_aga(S, zero(RS), RSS)) → times_out_aaa(one(R), S, RSS)
U35_aaa(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aaa(zero(R), S, zero(RS))
U35_aag(R, S, RS, times_out_aaa(R, S, RS)) → times_out_aag(zero(R), S, zero(RS))
times_in_aag(one(R), S, RSS) → U36_aag(R, S, RSS, times_in_aaa(R, S, RS))
U36_aag(R, S, RSS, times_out_aaa(R, S, RS)) → U37_aag(R, S, RSS, add_in_agg(S, zero(RS), RSS))
add_in_agg(b, b, b) → add_out_agg(b, b, b)
add_in_agg(X, b, X) → U1_agg(X, binaryZ_in_g(X))
U1_agg(X, binaryZ_out_g(X)) → add_out_agg(X, b, X)
add_in_agg(b, Y, Y) → U2_agg(Y, binaryZ_in_g(Y))
U2_agg(Y, binaryZ_out_g(Y)) → add_out_agg(b, Y, Y)
add_in_agg(X, Y, Z) → U3_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(zero(X), zero(Y), zero(Z)) → U10_agg(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_agg(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_agg(zero(X), zero(Y), zero(Z))
addz_in_agg(zero(X), one(Y), one(Z)) → U11_agg(X, Y, Z, addx_in_agg(X, Y, Z))
addx_in_agg(one(X), b, one(X)) → U4_agg(X, binary_in_g(X))
U4_agg(X, binary_out_g(X)) → addx_out_agg(one(X), b, one(X))
addx_in_agg(zero(X), b, zero(X)) → U5_agg(X, binaryZ_in_a(X))
U5_agg(X, binaryZ_out_a(X)) → addx_out_agg(zero(X), b, zero(X))
addx_in_agg(X, Y, Z) → U6_agg(X, Y, Z, addz_in_agg(X, Y, Z))
addz_in_agg(one(X), zero(Y), one(Z)) → U12_agg(X, Y, Z, addy_in_aag(X, Y, Z))
addy_in_aag(b, one(Y), one(Y)) → U7_aag(Y, binary_in_g(Y))
U7_aag(Y, binary_out_g(Y)) → addy_out_aag(b, one(Y), one(Y))
addy_in_aag(b, zero(Y), zero(Y)) → U8_aag(Y, binaryZ_in_a(Y))
U8_aag(Y, binaryZ_out_a(Y)) → addy_out_aag(b, zero(Y), zero(Y))
addy_in_aag(X, Y, Z) → U9_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(zero(X), zero(Y), zero(Z)) → U10_aag(X, Y, Z, addz_in_aaa(X, Y, Z))
U10_aag(X, Y, Z, addz_out_aaa(X, Y, Z)) → addz_out_aag(zero(X), zero(Y), zero(Z))
addz_in_aag(zero(X), one(Y), one(Z)) → U11_aag(X, Y, Z, addx_in_aag(X, Y, Z))
addx_in_aag(one(X), b, one(X)) → U4_aag(X, binary_in_g(X))
U4_aag(X, binary_out_g(X)) → addx_out_aag(one(X), b, one(X))
addx_in_aag(zero(X), b, zero(X)) → U5_aag(X, binaryZ_in_a(X))
U5_aag(X, binaryZ_out_a(X)) → addx_out_aag(zero(X), b, zero(X))
addx_in_aag(X, Y, Z) → U6_aag(X, Y, Z, addz_in_aag(X, Y, Z))
addz_in_aag(one(X), zero(Y), one(Z)) → U12_aag(X, Y, Z, addy_in_aag(X, Y, Z))
U12_aag(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_aag(one(X), zero(Y), one(Z))
addz_in_aag(one(X), one(Y), zero(Z)) → U13_aag(X, Y, Z, addc_in_aaa(X, Y, Z))
U13_aag(X, Y, Z, addc_out_aaa(X, Y, Z)) → addz_out_aag(one(X), one(Y), zero(Z))
U6_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addx_out_aag(X, Y, Z)
U11_aag(X, Y, Z, addx_out_aag(X, Y, Z)) → addz_out_aag(zero(X), one(Y), one(Z))
U9_aag(X, Y, Z, addz_out_aag(X, Y, Z)) → addy_out_aag(X, Y, Z)
U12_agg(X, Y, Z, addy_out_aag(X, Y, Z)) → addz_out_agg(one(X), zero(Y), one(Z))
addz_in_agg(one(X), one(Y), zero(Z)) → U13_agg(X, Y, Z, addc_in_aga(X, Y, Z))
U13_agg(X, Y, Z, addc_out_aga(X, Y, Z)) → addz_out_agg(one(X), one(Y), zero(Z))
U6_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → addx_out_agg(X, Y, Z)
U11_agg(X, Y, Z, addx_out_agg(X, Y, Z)) → addz_out_agg(zero(X), one(Y), one(Z))
U3_agg(X, Y, Z, addz_out_agg(X, Y, Z)) → add_out_agg(X, Y, Z)
U37_aag(R, S, RSS, add_out_agg(S, zero(RS), RSS)) → times_out_aag(one(R), S, RSS)

The argument filtering Pi contains the following mapping:
times_in_aag(x1, x2, x3)  =  times_in_aag(x3)
times_out_aag(x1, x2, x3)  =  times_out_aag(x1, x3)
zero(x1)  =  zero
U35_aag(x1, x2, x3, x4)  =  U35_aag(x4)
U36_aag(x1, x2, x3, x4)  =  U36_aag(x3, x4)
times_in_aaa(x1, x2, x3)  =  times_in_aaa
times_out_aaa(x1, x2, x3)  =  times_out_aaa(x1)
U35_aaa(x1, x2, x3, x4)  =  U35_aaa(x4)
U36_aaa(x1, x2, x3, x4)  =  U36_aaa(x4)
U37_aaa(x1, x2, x3, x4)  =  U37_aaa(x1, x4)
add_in_aga(x1, x2, x3)  =  add_in_aga(x2)
b  =  b
add_out_aga(x1, x2, x3)  =  add_out_aga(x1, x2, x3)
U1_aga(x1, x2)  =  U1_aga(x2)
binaryZ_in_a(x1)  =  binaryZ_in_a
U29_a(x1, x2)  =  U29_a(x2)
U30_a(x1, x2)  =  U30_a(x2)
binary_in_a(x1)  =  binary_in_a
binary_out_a(x1)  =  binary_out_a(x1)
U27_a(x1, x2)  =  U27_a(x2)
binaryZ_out_a(x1)  =  binaryZ_out_a(x1)
U28_a(x1, x2)  =  U28_a(x2)
U2_aga(x1, x2)  =  U2_aga(x1, x2)
binaryZ_in_g(x1)  =  binaryZ_in_g(x1)
U29_g(x1, x2)  =  U29_g(x2)
binaryZ_out_g(x1)  =  binaryZ_out_g(x1)
one(x1)  =  one(x1)
U30_g(x1, x2)  =  U30_g(x1, x2)
binary_in_g(x1)  =  binary_in_g(x1)
binary_out_g(x1)  =  binary_out_g(x1)
U27_g(x1, x2)  =  U27_g(x2)
U28_g(x1, x2)  =  U28_g(x1, x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x2, x4)
addz_in_aga(x1, x2, x3)  =  addz_in_aga(x2)
U10_aga(x1, x2, x3, x4)  =  U10_aga(x4)
addz_in_aaa(x1, x2, x3)  =  addz_in_aaa
U10_aaa(x1, x2, x3, x4)  =  U10_aaa(x4)
U11_aaa(x1, x2, x3, x4)  =  U11_aaa(x4)
addx_in_aaa(x1, x2, x3)  =  addx_in_aaa
U4_aaa(x1, x2)  =  U4_aaa(x2)
addx_out_aaa(x1, x2, x3)  =  addx_out_aaa(x1, x2, x3)
U5_aaa(x1, x2)  =  U5_aaa(x2)
U6_aaa(x1, x2, x3, x4)  =  U6_aaa(x4)
U12_aaa(x1, x2, x3, x4)  =  U12_aaa(x4)
addy_in_aaa(x1, x2, x3)  =  addy_in_aaa
U7_aaa(x1, x2)  =  U7_aaa(x2)
addy_out_aaa(x1, x2, x3)  =  addy_out_aaa(x1, x2, x3)
U8_aaa(x1, x2)  =  U8_aaa(x2)
U9_aaa(x1, x2, x3, x4)  =  U9_aaa(x4)
U13_aaa(x1, x2, x3, x4)  =  U13_aaa(x4)
addc_in_aaa(x1, x2, x3)  =  addc_in_aaa
addc_out_aaa(x1, x2, x3)  =  addc_out_aaa(x1, x2, x3)
U14_aaa(x1, x2, x3)  =  U14_aaa(x3)
succZ_in_aa(x1, x2)  =  succZ_in_aa
U33_aa(x1, x2)  =  U33_aa(x2)
succZ_out_aa(x1, x2)  =  succZ_out_aa(x1, x2)
U34_aa(x1, x2, x3)  =  U34_aa(x3)
succ_in_aa(x1, x2)  =  succ_in_aa
succ_out_aa(x1, x2)  =  succ_out_aa(x1, x2)
U31_aa(x1, x2)  =  U31_aa(x2)
U32_aa(x1, x2, x3)  =  U32_aa(x3)
U15_aaa(x1, x2, x3)  =  U15_aaa(x3)
U16_aaa(x1, x2, x3, x4)  =  U16_aaa(x4)
addC_in_aaa(x1, x2, x3)  =  addC_in_aaa
U23_aaa(x1, x2, x3, x4)  =  U23_aaa(x4)
addz_out_aaa(x1, x2, x3)  =  addz_out_aaa(x1, x2, x3)
addC_out_aaa(x1, x2, x3)  =  addC_out_aaa(x1, x2, x3)
U24_aaa(x1, x2, x3, x4)  =  U24_aaa(x4)
addX_in_aaa(x1, x2, x3)  =  addX_in_aaa
U17_aaa(x1, x2)  =  U17_aaa(x2)
addX_out_aaa(x1, x2, x3)  =  addX_out_aaa(x1, x2, x3)
U18_aaa(x1, x2, x3)  =  U18_aaa(x3)
U19_aaa(x1, x2, x3, x4)  =  U19_aaa(x4)
U25_aaa(x1, x2, x3, x4)  =  U25_aaa(x4)
addY_in_aaa(x1, x2, x3)  =  addY_in_aaa
U20_aaa(x1, x2)  =  U20_aaa(x2)
addY_out_aaa(x1, x2, x3)  =  addY_out_aaa(x1, x2, x3)
U21_aaa(x1, x2, x3)  =  U21_aaa(x3)
U22_aaa(x1, x2, x3, x4)  =  U22_aaa(x4)
U26_aaa(x1, x2, x3, x4)  =  U26_aaa(x4)
addz_out_aga(x1, x2, x3)  =  addz_out_aga(x1, x2, x3)
U11_aga(x1, x2, x3, x4)  =  U11_aga(x2, x4)
addx_in_aga(x1, x2, x3)  =  addx_in_aga(x2)
U4_aga(x1, x2)  =  U4_aga(x2)
addx_out_aga(x1, x2, x3)  =  addx_out_aga(x1, x2, x3)
U5_aga(x1, x2)  =  U5_aga(x2)
U6_aga(x1, x2, x3, x4)  =  U6_aga(x2, x4)
U12_aga(x1, x2, x3, x4)  =  U12_aga(x4)
U13_aga(x1, x2, x3, x4)  =  U13_aga(x2, x4)
addc_in_aga(x1, x2, x3)  =  addc_in_aga(x2)
addc_out_aga(x1, x2, x3)  =  addc_out_aga(x1, x2, x3)
U14_aga(x1, x2, x3)  =  U14_aga(x3)
U15_aga(x1, x2, x3)  =  U15_aga(x1, x3)
succZ_in_ga(x1, x2)  =  succZ_in_ga(x1)
U33_ga(x1, x2)  =  U33_ga(x2)
succZ_out_ga(x1, x2)  =  succZ_out_ga(x1, x2)
U34_ga(x1, x2, x3)  =  U34_ga(x1, x3)
succ_in_ga(x1, x2)  =  succ_in_ga(x1)
succ_out_ga(x1, x2)  =  succ_out_ga(x1, x2)
U31_ga(x1, x2)  =  U31_ga(x2)
U32_ga(x1, x2, x3)  =  U32_ga(x1, x3)
U16_aga(x1, x2, x3, x4)  =  U16_aga(x2, x4)
addC_in_aga(x1, x2, x3)  =  addC_in_aga(x2)
U23_aga(x1, x2, x3, x4)  =  U23_aga(x4)
addC_out_aga(x1, x2, x3)  =  addC_out_aga(x1, x2, x3)
U24_aga(x1, x2, x3, x4)  =  U24_aga(x2, x4)
addX_in_aga(x1, x2, x3)  =  addX_in_aga(x2)
U17_aga(x1, x2)  =  U17_aga(x2)
addX_out_aga(x1, x2, x3)  =  addX_out_aga(x1, x2, x3)
U18_aga(x1, x2, x3)  =  U18_aga(x3)
U19_aga(x1, x2, x3, x4)  =  U19_aga(x2, x4)
U25_aga(x1, x2, x3, x4)  =  U25_aga(x4)
U26_aga(x1, x2, x3, x4)  =  U26_aga(x2, x4)
U37_aag(x1, x2, x3, x4)  =  U37_aag(x1, x3, x4)
add_in_agg(x1, x2, x3)  =  add_in_agg(x2, x3)
add_out_agg(x1, x2, x3)  =  add_out_agg(x1, x2, x3)
U1_agg(x1, x2)  =  U1_agg(x1, x2)
U2_agg(x1, x2)  =  U2_agg(x1, x2)
U3_agg(x1, x2, x3, x4)  =  U3_agg(x2, x3, x4)
addz_in_agg(x1, x2, x3)  =  addz_in_agg(x2, x3)
U10_agg(x1, x2, x3, x4)  =  U10_agg(x4)
addz_out_agg(x1, x2, x3)  =  addz_out_agg(x1, x2, x3)
U11_agg(x1, x2, x3, x4)  =  U11_agg(x2, x3, x4)
addx_in_agg(x1, x2, x3)  =  addx_in_agg(x2, x3)
U4_agg(x1, x2)  =  U4_agg(x1, x2)
addx_out_agg(x1, x2, x3)  =  addx_out_agg(x1, x2, x3)
U5_agg(x1, x2)  =  U5_agg(x2)
U6_agg(x1, x2, x3, x4)  =  U6_agg(x2, x3, x4)
U12_agg(x1, x2, x3, x4)  =  U12_agg(x3, x4)
addy_in_aag(x1, x2, x3)  =  addy_in_aag(x3)
U7_aag(x1, x2)  =  U7_aag(x1, x2)
addy_out_aag(x1, x2, x3)  =  addy_out_aag(x1, x2, x3)
U8_aag(x1, x2)  =  U8_aag(x2)
U9_aag(x1, x2, x3, x4)  =  U9_aag(x3, x4)
addz_in_aag(x1, x2, x3)  =  addz_in_aag(x3)
U10_aag(x1, x2, x3, x4)  =  U10_aag(x4)
addz_out_aag(x1, x2, x3)  =  addz_out_aag(x1, x2, x3)
U11_aag(x1, x2, x3, x4)  =  U11_aag(x3, x4)
addx_in_aag(x1, x2, x3)  =  addx_in_aag(x3)
U4_aag(x1, x2)  =  U4_aag(x1, x2)
addx_out_aag(x1, x2, x3)  =  addx_out_aag(x1, x2, x3)
U5_aag(x1, x2)  =  U5_aag(x2)
U6_aag(x1, x2, x3, x4)  =  U6_aag(x3, x4)
U12_aag(x1, x2, x3, x4)  =  U12_aag(x3, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
U13_agg(x1, x2, x3, x4)  =  U13_agg(x2, x4)
TIMES_IN_AAA(x1, x2, x3)  =  TIMES_IN_AAA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

TIMES_IN_AAA(one(R), S, RSS) → TIMES_IN_AAA(R, S, RS)
TIMES_IN_AAA(zero(R), S, zero(RS)) → TIMES_IN_AAA(R, S, RS)

R is empty.
The argument filtering Pi contains the following mapping:
zero(x1)  =  zero
one(x1)  =  one(x1)
TIMES_IN_AAA(x1, x2, x3)  =  TIMES_IN_AAA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof

Q DP problem:
The TRS P consists of the following rules:

TIMES_IN_AAATIMES_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

TIMES_IN_AAATIMES_IN_AAA

The TRS R consists of the following rules:none


s = TIMES_IN_AAA evaluates to t =TIMES_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from TIMES_IN_AAA to TIMES_IN_AAA.